Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> > --- > fs/ext4/mballoc.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-)