lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 15 Jun 2021 09:52:32 +0200 From: Jan Kara <jack@...e.cz> To: Andreas Dilger <adilger@...ger.ca> Cc: Jan Kara <jack@...e.cz>, Ted Tso <tytso@....edu>, Ext4 Developers List <linux-ext4@...r.kernel.org> Subject: Re: [PATCH] tune2fs: Update overhead when toggling journal feature On Mon 14-06-21 15:38:57, Andreas Dilger wrote: > > > On Jun 14, 2021, at 3:28 PM, Jan Kara <jack@...e.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@...e.cz> > > You could add: > > Fixes: 9046b4dfd0ce ("mke2fs: set overhead in super block") > > and > > Reviewed-by: Andreas Dilger <adilger@...ger.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@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists