1 ext4: return FIEMAP_EXTENT_UNKNOWN for delalloc extents
3 From: Jie Liu <jeff.liu@oracle.com>
5 Return the FIEMAP_EXTENT_UNKNOWN flag as well except the
6 FIEMAP_EXTENT_DELALLOC because the data location of an
7 delayed allocation extent is unknown.
9 Signed-off-by: Jie Liu <jeff.liu@oracle.com>
11 fs/ext4/extents.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
14 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
15 index bc0f191..47e17b1 100644
16 --- a/fs/ext4/extents.c
17 +++ b/fs/ext4/extents.c
18 @@ -2125,7 +2125,8 @@ static int ext4_fill_fiemap_extents(struct inode *inode,
19 next_del = ext4_find_delayed_extent(inode, &es);
20 if (!exists && next_del) {
22 - flags |= FIEMAP_EXTENT_DELALLOC;
23 + flags |= (FIEMAP_EXTENT_DELALLOC |
24 + FIEMAP_EXTENT_UNKNOWN);
26 up_read(&EXT4_I(inode)->i_data_sem);