Skip to contentSkip to conversation

f2fs: recognize encrypted data in f2fs_fiemap

PATCH New Chao Yu 1 participant 1 message Jan 8, 2016 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/3 f2fs: recognize encrypted data in f2fs_fiemap

This patch fixes to teach f2fs_fiemap to recognize encrypted data.

---
 fs/f2fs/data.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/f2fs/data.c +5 -1
index 3001f9c..5249de8 100644
@@ -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;
Signature · 1 line
2.6.3