Make sure we set windowsize to zero if the free blocks left is less that window size. Otherwise we skip some group with low freeblock count during block allocation Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> --- fs/ext4/balloc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 7fdc236..a52fde3 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -1809,8 +1809,10 @@ ext4_fsblk_t ext4_old_new_blocks(handle_t *handle, struct inode *inode, * turn off reservation for this allocation */ if (my_rsv && (free_blocks < windowsz) - && (rsv_is_empty(&my_rsv->rsv_window))) + && (rsv_is_empty(&my_rsv->rsv_window))) { my_rsv = NULL; + windowsz = 0; + } if (free_blocks > 0) { bitmap_bh = ext4_read_block_bitmap(sb, group_no); -- 1.6.0.1.90.g27a6e -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html