Move ext4-use-percpu-data-for-lg_prealloc_list to stable series
[ext4-patch-queue.git] / ext4-request-for-blocks-with-ar.excepted_group-1.patch
blob93a47b73ebab579b803d0eaae83ccee841ac059c
1 From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2 ext4: request for blocks with ar.excepted_group = -1
4 Otherwise we skip group 0 during block allocation.
5 This cause ENOSPC even if we have free blocks in
6 group 0. This should be merged with defrag. The
7 expected_group changes are introduced by defrag patches.
9 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
10 ---
11 fs/ext4/balloc.c | 1 +
12 fs/ext4/extents.c | 1 +
13 2 files changed, 2 insertions(+), 0 deletions(-)
15 diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
16 index b19346a..53fdb05 100644
17 --- a/fs/ext4/balloc.c
18 +++ b/fs/ext4/balloc.c
19 @@ -2023,6 +2023,7 @@ static ext4_fsblk_t do_blk_alloc(handle_t *handle, struct inode *inode,
20 ar.goal = goal;
21 ar.len = *count;
22 ar.logical = iblock;
23 + ar.excepted_group = -1;
25 if (S_ISREG(inode->i_mode) && !(flags & EXT4_META_BLOCK))
26 /* enable in-core preallocation for data block allocation */
27 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
28 index bf612a7..268e96d 100644
29 --- a/fs/ext4/extents.c
30 +++ b/fs/ext4/extents.c
31 @@ -2879,6 +2879,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
32 ar.goal = ext4_ext_find_goal(inode, path, iblock);
33 ar.logical = iblock;
34 ar.len = allocated;
35 + ar.excepted_group = -1;
36 if (S_ISREG(inode->i_mode))
37 ar.flags = EXT4_MB_HINT_DATA;
38 else
39 --
40 1.6.0.1.90.g27a6e