* Size of journal?
@ 2010-01-10 18:55 Jeff Layton
2010-01-11 5:06 ` Eric Sandeen
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2010-01-10 18:55 UTC (permalink / raw)
To: linux-ext4
Good afternoon!
I was wondering what the default journal size is for ext4
when it's built on a single partition? Or does it vary in size
as needed?
TIA!
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Size of journal?
2010-01-10 18:55 Size of journal? Jeff Layton
@ 2010-01-11 5:06 ` Eric Sandeen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2010-01-11 5:06 UTC (permalink / raw)
To: Jeff Layton; +Cc: linux-ext4
Jeff Layton wrote:
> Good afternoon!
>
> I was wondering what the default journal size is for ext4
> when it's built on a single partition? Or does it vary in size
> as needed?
>
> TIA!
>
> Jeff
See figure_journal_size() in mke2fs.c. It's called w/ size == -1
if no other size is specified on the commandline so that goes
to ext2fs_default_journal_size(), which is pretty straightforward
in its scaling with nr of filesystem blocks:
/*
* 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 blocks)
{
if (blocks < 2048)
return -1;
if (blocks < 32768)
return (1024);
if (blocks < 256*1024)
return (4096);
if (blocks < 512*1024)
return (8192);
if (blocks < 1024*1024)
return (16384);
return 32768;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-11 5:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-10 18:55 Size of journal? Jeff Layton
2010-01-11 5:06 ` Eric Sandeen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.