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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8fb18273-9d8a-835f-7745-c0c558fb5d41@huaweicloud.com>
Date:   Tue, 22 Aug 2023 10:48:03 +0800
From:   Kemeng Shi <shikemeng@...weicloud.com>
To:     Theodore Ts'o <tytso@....edu>
Cc:     adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/13] ext4: correct gdblock calculation in
 add_new_gdb_meta_bg to support non first group



on 8/19/2023 12:54 AM, Theodore Ts'o wrote:
> On Fri, Aug 18, 2023 at 03:09:35PM +0800, Kemeng Shi wrote:
>>> Is following comment looks good to you:
>>
>> When all reserved primary blocks are consumed, we create meta_bg group and
>> allocate new primary block at first block or block after backup superblock
>> (if exsiting) in first group of meta_bg group.
>> This function is only called when first group of meta_bg is added.
> 
> Well, it's possible to create a file system where all of the block
> group descriptors use meta_bg, and there are no "traditional" block
> group descriptors.  And so what happens is if there is no available
> space in the existing block group descriptors for the new block group,
> and there are no reserved block group descriptors (I'd remove
> "primary" as that's not something that we've used traditionally), then
> what happens is that the meta_bg feature will get enabled, and 
> es->s_first_meta_bg will get set to the first block group that is
> managed using meta_bg.  s_first_meta_bg must be a multiple of
> EXT4_DESC_PER_BLOCK(sb).
> 
> Some of this is documented in Documentation/filesystems/ext4/blockgroup.rst
> already.
>
As these information into comment of add_new_gdb_meta_bg could help to some
dgree. I summary the information to:

If there is no available space in the existing block group descriptors for
the new block group and there are no reserved block group descriptors, then
the meta_bg feature will get enabled, and es->s_first_meta_bg will get set
to the first block group that is managed using meta_bg and s_first_meta_bg
must be a multiple of EXT4_DESC_PER_BLOCK(sb).
This function will be called when first group of meta_bg is added to bring
new group descriptors block of new added meta_bg.

Or I will leave comments unchange in next version if it's redundant to you.
Thanks!
> Cheers,
> 
> 						- Ted
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ