Skip to content

Commit

Permalink
f2fs: skip encrypted inode in ASYNC IPU policy
Browse files Browse the repository at this point in the history
Async request may be throttled in block layer, so page for async may keep WRITE_BACK
for a long time.

For encrytped inode, we need wait on page writeback no matter if the device supports
BDI_CAP_STABLE_WRITES. This may result in a higher waiting page writeback time for
async encrypted inode page.

This patch skips IPU for encrypted inode's updating write.

Signed-off-by: Hou Pengyang <houpengyang@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Hou Pengyang authored and Jaegeuk Kim committed Apr 24, 2017
1 parent a788189 commit 4086d3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/f2fs/segment.h
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ static inline bool need_inplace_update(struct inode *inode,
*/
if (policy & (0x1 << F2FS_IPU_ASYNC) &&
fio && fio->op == REQ_OP_WRITE &&
!(fio->op_flags & REQ_SYNC))
!(fio->op_flags & REQ_SYNC) &&
!f2fs_encrypted_inode(inode))
return true;

/* this is only set during fdatasync */
Expand Down

0 comments on commit 4086d3f

Please sign in to comment.