summaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.h
diff options
context:
space:
mode:
authorHou Pengyang <houpengyang@huawei.com>2017-04-21 15:41:48 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2017-04-24 23:13:24 +0300
commit4086d3f61b6573f65ddc13fc375c0c7b0ac482a0 (patch)
treee3768d31da70fa22b4db03f351407879f20d503d /fs/f2fs/segment.h
parenta788189305df9fa617e5e26dc0914d80d981cd57 (diff)
downloadlinux-4086d3f61b6573f65ddc13fc375c0c7b0ac482a0.tar.xz
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: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r--fs/f2fs/segment.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 93cc4e504aab..8ad22b8cbba7 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -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 */