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