f2fs: fix to tag FIEMAP_EXTENT_MERGED in f2fs_fiemap()
authorChao Yu <yuchao0@huawei.com>
Mon, 14 Dec 2020 09:20:57 +0000 (17:20 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 27 Jan 2021 23:20:03 +0000 (15:20 -0800)
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 <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c

index 57b9aab..547c9d4 100644 (file)
@@ -1964,6 +1964,7 @@ next:
        }
 
        if (size) {
+               flags |= FIEMAP_EXTENT_MERGED;
                if (IS_ENCRYPTED(inode))
                        flags |= FIEMAP_EXTENT_DATA_ENCRYPTED;