add patch use-EXT_MAX_BLOCKS-in-ext4_es_can_be_merged
[ext4-patch-queue.git] / disable-COLLAPSE_RANGE-for-bigalloc
blobb54f345dc4c4424cdaf5800d3f31de278d03296d
1 ext4: disable COLLAPSE_RANGE for bigalloc
3 From: Namjae Jeon <namjae.jeon@samsung.com>
5 Once COLLAPSE RANGE is be disable for ext4 with bigalloc feature till finding
6 root-cause of problem. It will be enable with fixing that regression of
7 xfstest(generic 075 and 091) again.
9 Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
10 Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
11 Reviewed-by: Lukas Czerner <lczerner@redhat.com>
12 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 ---
14  fs/ext4/extents.c | 3 +++
15  1 file changed, 3 insertions(+)
17 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
18 index 4cf8c5b..3276865 100644
19 --- a/fs/ext4/extents.c
20 +++ b/fs/ext4/extents.c
21 @@ -5406,6 +5406,9 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
22         if (!S_ISREG(inode->i_mode))
23                 return -EINVAL;
25 +       if (EXT4_SB(inode->i_sb)->s_cluster_ratio > 1)
26 +               return -EOPNOTSUPP;
28         trace_ext4_collapse_range(inode, offset, len);
30         punch_start = offset >> EXT4_BLOCK_SIZE_BITS(sb);
31 -- 
32 1.7.11-rc0
35 To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
36 the body of a message to majordomo@vger.kernel.org
37 More majordomo info at  http://vger.kernel.org/majordomo-info.html