From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>,
linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org, Kemeng Shi <shikemeng@huaweicloud.com>
Subject: Re: [PATCH v2 2/2] ext4: Convert EXT4_B2C(sbi->s_stripe) users to EXT4_NUM_B2C
Date: Wed, 28 Aug 2024 14:58:13 +0530 [thread overview]
Message-ID: <87wmk1q9n6.fsf@gmail.com> (raw)
In-Reply-To: <aff746f3dbce54f5ea807928c2286edfd6e9976e.1724145714.git.ojaswin@linux.ibm.com>
Ojaswin Mujoo <ojaswin@linux.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@linux.ibm.com>
> ---
> fs/ext4/mballoc.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
next prev parent reply other threads:[~2024-08-28 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 9:27 [PATCH v2 1/2] ext4: Check stripe size compatibility on remount as well Ojaswin Mujoo
2024-08-20 9:27 ` [PATCH v2 2/2] ext4: Convert EXT4_B2C(sbi->s_stripe) users to EXT4_NUM_B2C Ojaswin Mujoo
2024-08-20 12:48 ` Kemeng Shi
2024-08-28 9:28 ` Ritesh Harjani [this message]
2024-08-30 5:02 ` Ojaswin Mujoo
2024-08-28 9:33 ` [PATCH v2 1/2] ext4: Check stripe size compatibility on remount as well Ritesh Harjani
2024-08-30 5:03 ` Ojaswin Mujoo
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=87wmk1q9n6.fsf@gmail.com \
--to=ritesh.list@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=shikemeng@huaweicloud.com \
--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.