All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Jan Kara <jack@suse.cz>, Ted Tso <tytso@mit.edu>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] tune2fs: Update overhead when toggling journal feature
Date: Tue, 15 Jun 2021 09:52:32 +0200	[thread overview]
Message-ID: <20210615075232.GE29751@quack2.suse.cz> (raw)
In-Reply-To: <E6977B7F-091D-40E9-B0CD-BB3D8B7FE287@dilger.ca>

On Mon 14-06-21 15:38:57, Andreas Dilger wrote:
> 
> > On Jun 14, 2021, at 3:28 PM, Jan Kara <jack@suse.cz> wrote:
> > 
> > When adding or removing journal from a filesystem, we also need to add /
> > remove journal blocks from overhead stored in the superblock.  Otherwise
> > total number of blocks in the filesystem as reported by statfs(2) need
> > not match reality and could lead to odd results like negative number of
> > used blocks reported by df(1).
> > 
> > Signed-off-by: Jan Kara <jack@suse.cz>
> 
> You could add:
> 
> Fixes: 9046b4dfd0ce ("mke2fs: set overhead in super block")
> 
> and
> 
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>

Thanks!

> That also makes me wonder if resize2fs also needs to recalculate or
> invalidate the s_overhead_clusters field when adding new block groups.
> It *looks* like that is done correctly in adjust_fs_info() already?

Yes. From a quick look I had when doing this tune2fs patch I've noticed
that adjust_fs_info() just zeros s_overhead_clusters which makes the kernel
compute the overhead instead...

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2021-06-15  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 21:28 [PATCH] tune2fs: Update overhead when toggling journal feature Jan Kara
2021-06-14 21:38 ` Andreas Dilger
2021-06-15  7:52   ` Jan Kara [this message]
2021-07-07  2:28 ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210615075232.GE29751@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.