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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <DM6PR10MB434724909C97728F1618F589A0212@DM6PR10MB4347.namprd10.prod.outlook.com>
Date: Wed, 6 Mar 2024 06:55:33 +0000
From: Srivathsa Dara <srivathsa.d.dara@...cle.com>
To: Ritesh Harjani <ritesh.list@...il.com>,
        "linux-ext4@...r.kernel.org"
	<linux-ext4@...r.kernel.org>
CC: "tytso@....edu" <tytso@....edu>,
        "adilger.kernel@...ger.ca"
	<adilger.kernel@...ger.ca>,
        Rajesh Sivaramasubramaniom
	<rajesh.sivaramasubramaniom@...cle.com>,
        Junxiao Bi <junxiao.bi@...cle.com>
Subject: RE: [PATCH] ext4: Enable meta_bg only when new desc blocks are needed

Hi Ritesh,

> -----Original Message-----
> From: Ritesh Harjani <ritesh.list@...il.com> 
> Sent: Wednesday, March 6, 2024 9:32 AM
> To: Srivathsa Dara <srivathsa.d.dara@...cle.com>; linux-ext4@...r.kernel.org
> Cc: tytso@....edu; adilger.kernel@...ger.ca; Rajesh Sivaramasubramaniom <rajesh.sivaramasubramaniom@...cle.com>; Junxiao Bi <junxiao.bi@...cle.com>
> Subject: Re: [PATCH] ext4: Enable meta_bg only when new desc blocks are needed
> 
> Srivathsa Dara <srivathsa.d.dara@...cle.com> writes:
> 
> > This patch addresses an issue observed when resize_inode is disabled
> 
> Other than "meta_bg unwatedly getting enabled when not required", is there any other issue you observed?

Yes, we have seen an issue where a data block is being corrupted by group 
descriptor block because of this. The following patch fixes that issue.

	ext4: fix corruption during on-line resize
	commit: 3a944549dd26ccaf1f898a4be952e75a42bf37dd
	
> 
> > and an online extension of a filesysyem is performed. When a 
> > filesystem is expanded to a size that does not require a addition of a 
> > new descriptor block, the meta_bg feature is being enabled even though 
> > no part of the filesystem uses this layout.
> >
> > This patch ensures that the meta_bg feature is only enabled if any of 
> > the added block groups utilize meta_bg layout.
> 
> Make sense to me. 
> 
> >
> > Signed-off-by: Srivathsa Dara <srivathsa.d.dara@...cle.com>
> > ---
> >  fs/ext4/resize.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 
> > 928700d57eb6..99b52f26e818 100644
> > --- a/fs/ext4/resize.c
> > +++ b/fs/ext4/resize.c
> > @@ -1996,7 +1996,7 @@ int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count)
> >  		}
> >  	}
> >  
> > -	if ((!resize_inode && !meta_bg) || n_blocks_count == o_blocks_count) {
> > +	if ((!resize_inode && !meta_bg && n_desc_blocks > o_desc_blocks) || 
> > +n_blocks_count == o_blocks_count) {
> 
> Beyond 80 chars line. You might want to fix that.

Sorry, I missed that, will send a V2.

> 
> -ritesh
> 
> >  		err = ext4_convert_meta_bg(sb, resize_inode);
> >  		if (err)
> >  			goto out;
> > --
> > 2.39.3

Thanks,
Srivathsa Dara

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ