All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] f2fs: recognize encrypted data in f2fs_fiemap
@ 2016-01-08 12:19 Chao Yu
  0 siblings, 0 replies; only message in thread
From: Chao Yu @ 2016-01-08 12:19 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-f2fs-devel, linux-kernel

This patch fixes to teach f2fs_fiemap to recognize encrypted data.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
 fs/f2fs/data.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 3001f9c..5249de8 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -833,9 +833,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;
-- 
2.6.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-08 12:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-08 12:19 [PATCH 1/3] f2fs: recognize encrypted data in f2fs_fiemap Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.