All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: skip encrypted inode in ASYNC IPU policy
@ 2017-04-21 12:41 Hou Pengyang
  0 siblings, 0 replies; only message in thread
From: Hou Pengyang @ 2017-04-21 12:41 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: linux-f2fs-devel

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>
---
 fs/f2fs/segment.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 4a85035..99e1e21 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -590,7 +590,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 */
-- 
2.10.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-21 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21 12:41 [PATCH] f2fs: skip encrypted inode in ASYNC IPU policy Hou Pengyang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.