All of lore.kernel.org
 help / color / mirror / Atom feed
* [Virtio-fs] [PATCH][RFC] viriofsd: do not fall back to buffer io when cache=auto
@ 2019-08-14  9:46 piaojun
  2019-08-19  0:48 ` piaojun
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: piaojun @ 2019-08-14  9:46 UTC (permalink / raw)
  To: virtio-fs

Direct io flags will be tured off even if cache=auto, which seems a
little bit strange. It's better to keep the open flags set by user. If
I missed the discussion about this issue, please let me know, thanks.

Signed-off-by: Jun Piao <piaojun@huawei.com>
---
 contrib/virtiofsd/passthrough_ll.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/passthrough_ll.c
index 321bbb2..a080f0d 100644
--- a/contrib/virtiofsd/passthrough_ll.c
+++ b/contrib/virtiofsd/passthrough_ll.c
@@ -1687,6 +1687,8 @@ static void lo_create(fuse_req_t req, fuse_ino_t parent, const char *name,
 		fi->direct_io = 1;
 	else if (lo->cache == CACHE_ALWAYS)
 		fi->keep_cache = 1;
+	else
+		fi->direct_io = !!(fi->flags & O_DIRECT);

 out:
 	lo_inode_put(lo, &parent_inode);
@@ -1899,6 +1901,8 @@ static void lo_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 		fi->direct_io = 1;
 	else if (lo->cache == CACHE_ALWAYS)
 		fi->keep_cache = 1;
+	else
+		fi->direct_io = !!(fi->flags & O_DIRECT);
 	fuse_reply_open(req, fi);
 }

-- 


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-08-23  1:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-14  9:46 [Virtio-fs] [PATCH][RFC] viriofsd: do not fall back to buffer io when cache=auto piaojun
2019-08-19  0:48 ` piaojun
2019-08-19  3:15 ` Eryu Guan
2019-08-19  3:51   ` piaojun
2019-08-19  5:07     ` Eryu Guan
2019-08-19  6:07       ` piaojun
2019-08-19  6:49 ` [Virtio-fs] [PATCH RESEND][RFC] virtiofsd: do not fall back to buffer io when cache=auto/always piaojun
2019-08-19  7:34   ` Eryu Guan
2019-08-19 14:16     ` piaojun
2019-08-20 15:39   ` Vivek Goyal
2019-08-20 17:56     ` Vivek Goyal
2019-08-21  1:48       ` piaojun
2019-08-21 13:11         ` Vivek Goyal
2019-08-21 14:38           ` piaojun
2019-08-21 14:47             ` Vivek Goyal
2019-08-22  5:01               ` piaojun
2019-08-23  1:55           ` piaojun
2019-08-20 15:31 ` [Virtio-fs] [PATCH][RFC] viriofsd: do not fall back to buffer io when cache=auto Vivek Goyal

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.