2020-12-14 10:40:44

by Chao Yu

[permalink] [raw]
Subject: [PATCH] f2fs: fix to tag FIEMAP_EXTENT_MERGED in f2fs_fiemap()

f2fs does not natively support extents in metadata, 'extent' in f2fs
is used as a virtual concept, so in f2fs_fiemap() interface, it needs
to tag FIEMAP_EXTENT_MERGED flag to indicated the extent status is a
result of merging.

Signed-off-by: Chao Yu <[email protected]>
---
fs/f2fs/data.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 894c5680db4a..baa9ccf84e2c 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1971,6 +1971,7 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
}

if (size) {
+ flags |= FIEMAP_EXTENT_MERGED;
if (IS_ENCRYPTED(inode))
flags |= FIEMAP_EXTENT_DATA_ENCRYPTED;

--
2.29.2