diff options
| author | Hou Pengyang <houpengyang@huawei.com> | 2017-04-21 08:41:48 -0400 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-24 16:13:24 -0400 |
| commit | 4086d3f61b6573f65ddc13fc375c0c7b0ac482a0 (patch) | |
| tree | e3768d31da70fa22b4db03f351407879f20d503d /fs/f2fs | |
| parent | a788189305df9fa617e5e26dc0914d80d981cd57 (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>
Diffstat (limited to 'fs/f2fs')
| -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 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, | |||
| 593 | */ | 593 | */ |
| 594 | if (policy & (0x1 << F2FS_IPU_ASYNC) && | 594 | if (policy & (0x1 << F2FS_IPU_ASYNC) && |
| 595 | fio && fio->op == REQ_OP_WRITE && | 595 | fio && fio->op == REQ_OP_WRITE && |
| 596 | !(fio->op_flags & REQ_SYNC)) | 596 | !(fio->op_flags & REQ_SYNC) && |
| 597 | !f2fs_encrypted_inode(inode)) | ||
| 597 | return true; | 598 | return true; |
| 598 | 599 | ||
| 599 | /* this is only set during fdatasync */ | 600 | /* this is only set during fdatasync */ |
