aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2016-01-08 20:19:27 +0800
committerZhao Wei Liew <zhaoweiliew@gmail.com>2016-02-23 19:01:43 +0800
commit9789c6e8ea0df3385e2d3f7fdab4dcf0ed104dec (patch)
tree0243b1bc949f082efb51a16f8275da0552a93818
parente9646709ab71b8f6c37fbb740eca293e0f701615 (diff)
f2fs: recognize encrypted data in f2fs_fiemap
This patch fixes to teach f2fs_fiemap to recognize encrypted data. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index e014af7a7b1..390a75999e7 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -831,9 +831,13 @@ next:
flags |= FIEMAP_EXTENT_LAST;
}
- if (size)
+ if (size) {
+ if (f2fs_encrypted_inode(inode))
+ flags |= FIEMAP_EXTENT_DATA_ENCRYPTED;
+
ret = fiemap_fill_next_extent(fieinfo, logical,
phys, size, flags);
+ }
if (start_blk > last_blk || ret)
goto out;