ext4: disable COLLAPSE_RANGE for bigalloc
PATCH 3/3 ext4: disable COLLAPSE_RANGE for bigalloc
From: Namjae Jeon <[email protected]>
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.
--- fs/ext4/extents.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/ext4/extents.c +5 -0
@@ -5461,6 +5461,11 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len) goto out_mutex; } +if (EXT4_SB (inode->i_sb)->s_cluster_ratio >1 ) { + ret = -EOPNOTSUPP ; + goto out_mutex; + } +truncate_pagecache_range (inode, ioffset,-1 );/* Wait for existing dio to complete */
Signature · 1 line
1.7.11-rc0
Quoted 24 lines · Namjae Jeon
Date: Thu, 17 Apr 2014 07:30:54 +0900
From: Namjae Jeon <[email protected]>
To: Theodore Ts'o <[email protected]>
Cc: linux-ext4 <[email protected]>,
Lukáš Czerner <[email protected]>
Subject: [PATCH 3/3] ext4: disableCOLLAPSE_RANGEfor bigallocFrom: Namjae Jeon <[email protected]>
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 <[email protected]>Signed-off-by Ashish Sangwan <[email protected]>--- fs/ext4/extents.c | 5 +++++ 1 file changed, 5 insertions(+)fs/ext4/extents.c +0
-0
fs/ext4/extents.c int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len) · line 5468
Quoted 8 lines
fs/ext4/extents.c +5
-0@@ -5461,6 +5461,11 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len) goto out_mutex; } +if (EXT4_SB (inode->i_sb)->s_cluster_ratio >1 ) { + ret = -EOPNOTSUPP ; + goto out_mutex; + } +
I do not think we need to hold mutex for this. You can move it to the beginning of the function preferably right after S_ISREG check.
Otherwise it looks ok, but it would be better if we could fix it :)
Quoted 4 lines
fs/ext4/extents.c +0
-0truncate_pagecache_range (inode, ioffset,-1 );/* Wait for existing dio to complete */
Quoted 12 lines
fs/ext4/extents.c int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len) · line 5468
Quoted 8 lines
fs/ext4/extents.c +5
-0} +if (EXT4_SB (inode->i_sb)->s_cluster_ratio >1 ) { + ret = -EOPNOTSUPP ; + goto out_mutex; + } +I do not think we need to hold mutex for this. You can move it to the beginning of the function preferably right after
S_ISREGcheck.
Quoted 1 line
Otherwise it looks ok, but it would be better if we could fix it :)
Okay, Thanks for review!
Quoted 7 lines
Reviewed-by Lukas Czerner <[email protected]>Quoted 4 lines
fs/ext4/extents.c +0
-0truncate_pagecache_range (inode, ioffset,-1 );/* Wait for existing dio to complete */