On Wed, Mar 22, 2023 at 12:12:20AM +0800, Kemeng Shi wrote: > ext4_mb_new_blocks_simple ignores the group before goal, so it will fail > if free blocks reside in group before goal. Try all groups to avoid > unexpected failure. > Search finishes either if any free block is found or if no available > blocks are found. Simpliy check "i >= max" to distinguish the above > cases. > > Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> > Suggested-by: Theodore Ts'o <tytso@xxxxxxx> > --- > fs/ext4/mballoc.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Feel free to add: Reviewed-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx> Regards, ojaswin