Commit 4086d3f6 authored by Hou Pengyang's avatar Hou Pengyang Committed by Jaegeuk Kim

f2fs: skip encrypted inode in ASYNC IPU policy

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: default avatarHou Pengyang <houpengyang@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent a7881893
...@@ -593,7 +593,8 @@ static inline bool need_inplace_update(struct inode *inode, ...@@ -593,7 +593,8 @@ static inline bool need_inplace_update(struct inode *inode,
*/ */
if (policy & (0x1 << F2FS_IPU_ASYNC) && if (policy & (0x1 << F2FS_IPU_ASYNC) &&
fio && fio->op == REQ_OP_WRITE && fio && fio->op == REQ_OP_WRITE &&
!(fio->op_flags & REQ_SYNC)) !(fio->op_flags & REQ_SYNC) &&
!f2fs_encrypted_inode(inode))
return true; return true;
/* this is only set during fdatasync */ /* this is only set during fdatasync */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment