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: <87wmk1q9n6.fsf@gmail.com>
Date: Wed, 28 Aug 2024 14:58:13 +0530
From: Ritesh Harjani (IBM) <ritesh.list@...il.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>, linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>
Cc: linux-kernel@...r.kernel.org, Kemeng Shi <shikemeng@...weicloud.com>
Subject: Re: [PATCH v2 2/2] ext4: Convert EXT4_B2C(sbi->s_stripe) users to EXT4_NUM_B2C

Ojaswin Mujoo <ojaswin@...ux.ibm.com> writes:

> Although we have checks to make sure s_stripe is a multiple of cluster
> size, in case we accidentally end up with a scenario where this is not
> the case, use EXT4_NUM_B2C() so that we don't end up with unexpected
> cases where EXT4_B2C(stripe) becomes 0.

man page of strip=n mount options says...
       stripe=n
              Number of file system blocks that mballoc will try to use
              for allocation size and alignment. For RAID5/6 systems
              this should be the number of data disks * RAID chunk size
              in file system blocks.

... So stripe is anyways the no. of filesystem blocks. Making it
EXT4_NUM_B2C() make sense to me.

However, there is one more user that remains in ext4_mb_find_by_goal(),
right?

-ritesh

>
> Also make the is_stripe_aligned check in regular_allocator a bit more
> robust while we are at it. This should ideally have no functional change
> unless we have a bug somewhere causing (stripe % cluster_size != 0)
>
> Signed-off-by: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
> ---
>  fs/ext4/mballoc.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ