diff options
| author | Hou Pengyang <houpengyang@huawei.com> | 2017-04-21 12:41:48 +0000 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:42:39 +0200 |
| commit | c939ba86c7e5a76d655d0db6ac690014d43f9c5c (patch) | |
| tree | 9784bc23f081daeff7cd98707f3f52291381848a | |
| parent | 5ba24450c19b3d20a87ac7564f3ca18da2cab4a6 (diff) | |
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>
| -rw-r--r-- | fs/f2fs/segment.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 826b607a2..f6499ae86 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -592,7 +592,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 */ |
