e2fsprogs にこんなコードが.
/* * Find a reasonable journal file size (in blocks) given the number of blocks * in the filesystem. For very small filesystems, it is not reasonable to * have a journal that fills more than half of the filesystem. */ int ext2fs_default_journal_size(__u64 num_blocks) { if (num_blocks < 2048) return -1; if (num_blocks < 32768) return (1024); if (num_blocks < 256*1024) return (4096); if (num_blocks < 512*1024) return (8192); if (num_blocks < 1024*1024) return (16384); return 32768; }