[Devel] [PATCH RH7 3/3] ext4: Avoid sleepable debug check in ext4_map_blocks_es_recheck() on ploop fastmap

Kirill Tkhai ktkhai at virtuozzo.com
Mon Jul 20 14:03:50 MSK 2020


ext4_map_blocks_es_recheck() takes mutex, so we avoid it on fastmap.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/ext4/inode.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a0f1e91d65d7..bc253a0f177c 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -518,8 +518,9 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
 			BUG_ON(1);
 		}
 #ifdef ES_AGGRESSIVE_TEST
-		ext4_map_blocks_es_recheck(handle, inode, map,
-					   &orig_map, flags);
+		if (!(flags & EXT4_GET_BLOCKS_EXTENT_TREE_ONLY_NONBLOCK))
+			ext4_map_blocks_es_recheck(handle, inode, map,
+						   &orig_map, flags);
 #endif
 		goto found;
 	}




More information about the Devel mailing list