* [PATCH] ext3: Count journal as bsddf overhead in ext3_statfs
@ 2013-10-15 23:45 Eric Sandeen
2013-10-16 12:29 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2013-10-15 23:45 UTC (permalink / raw)
To: ext4 development; +Cc: Jan Kara
ext4 counts journal space as bsddf overhead, but ext3 does not.
For some reason when I patched ext4 I thought I should leave
ext3 alone, but frankly it makes more sense to fix it, I think.
Otherwise we get inconsistent behavior from ext3 under ext3.ko,
and ext3 under ext4.ko, which is not at all desirable...
This is testable by xfstests shared/289, though it will need
modification because it currently special-cases ext3.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index c50c761..37fd31e 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2825,6 +2825,10 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
* bitmap, and an inode table.
*/
overhead += ngroups * (2 + sbi->s_itb_per_group);
+
+ /* Add the journal blocks as well */
+ overhead += sbi->s_journal->j_maxlen;
+
sbi->s_overhead_last = overhead;
smp_wmb();
sbi->s_blocks_last = le32_to_cpu(es->s_blocks_count);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext3: Count journal as bsddf overhead in ext3_statfs
2013-10-15 23:45 [PATCH] ext3: Count journal as bsddf overhead in ext3_statfs Eric Sandeen
@ 2013-10-16 12:29 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2013-10-16 12:29 UTC (permalink / raw)
To: Eric Sandeen; +Cc: ext4 development, Jan Kara
On Tue 15-10-13 18:45:17, Eric Sandeen wrote:
> ext4 counts journal space as bsddf overhead, but ext3 does not.
>
> For some reason when I patched ext4 I thought I should leave
> ext3 alone, but frankly it makes more sense to fix it, I think.
>
> Otherwise we get inconsistent behavior from ext3 under ext3.ko,
> and ext3 under ext4.ko, which is not at all desirable...
>
> This is testable by xfstests shared/289, though it will need
> modification because it currently special-cases ext3.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
OK, fair enough. Applied to my tree.
Honza
> ---
>
> diff --git a/fs/ext3/super.c b/fs/ext3/super.c
> index c50c761..37fd31e 100644
> --- a/fs/ext3/super.c
> +++ b/fs/ext3/super.c
> @@ -2825,6 +2825,10 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
> * bitmap, and an inode table.
> */
> overhead += ngroups * (2 + sbi->s_itb_per_group);
> +
> + /* Add the journal blocks as well */
> + overhead += sbi->s_journal->j_maxlen;
> +
> sbi->s_overhead_last = overhead;
> smp_wmb();
> sbi->s_blocks_last = le32_to_cpu(es->s_blocks_count);
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-16 12:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 23:45 [PATCH] ext3: Count journal as bsddf overhead in ext3_statfs Eric Sandeen
2013-10-16 12:29 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).