ext4: disable COLLAPSE_RANGE for bigalloc
authorNamjae Jeon <namjae.jeon@samsung.com>
Sat, 19 Apr 2014 20:38:21 +0000 (16:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 19 Apr 2014 20:38:21 +0000 (16:38 -0400)
Once COLLAPSE RANGE is be disable for ext4 with bigalloc feature till finding
root-cause of problem. It will be enable with fixing that regression of
xfstest(generic 075 and 091) again.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c

index d6bca2a..01b0c20 100644 (file)
@@ -5406,6 +5406,9 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
        if (!S_ISREG(inode->i_mode))
                return -EINVAL;
 
+       if (EXT4_SB(inode->i_sb)->s_cluster_ratio > 1)
+               return -EOPNOTSUPP;
+
        trace_ext4_collapse_range(inode, offset, len);
 
        punch_start = offset >> EXT4_BLOCK_SIZE_BITS(sb);