Skip to content

Commit

Permalink
f2fs: recognize encrypted data in f2fs_fiemap
Browse files Browse the repository at this point in the history
This patch fixes to teach f2fs_fiemap to recognize encrypted data.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Jan 8, 2016
1 parent 2c4db1a commit da5af12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,13 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
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;
Expand Down

0 comments on commit da5af12

Please sign in to comment.