FreeBSD Bugzilla – Attachment 146279 Details for
Bug 192701
[fusefs] FOPEN_DIRECT_IO not honored by fuse module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
FUSE honor FOPEN_DIRECT_IO v3
fuse_freebsd_direct_io.patch (text/plain), 2.04 KB, created by
Harshavardhana
on 2014-08-25 23:04:55 UTC
(
hide
)
Description:
FUSE honor FOPEN_DIRECT_IO v3
Filename:
MIME Type:
Creator:
Harshavardhana
Created:
2014-08-25 23:04:55 UTC
Size:
2.04 KB
patch
obsolete
>Index: fuse_node.c >=================================================================== >--- fuse_node.c (revision 270029) >+++ fuse_node.c (working copy) >@@ -273,9 +273,27 @@ > * Funcation is called for every vnode open. > * Merge fuse_open_flags it may be 0 > * >- * XXXIP: Handle FOPEN_DIRECT_IO and FOPEN_KEEP_CACHE >+ * XXXIP: Handle FOPEN_KEEP_CACHE > */ >+ /* >+ * Ideally speaking, direct io should be enabled on >+ * fd's but do not see of any way of providing that >+ * this implementation. > >+ * Also cannot think of a reason why would two >+ * different fd's on same vnode would like >+ * have DIRECT_IO turned on and off. But linux >+ * based implementation works on an fd not an >+ * inode and provides such a feature. >+ * >+ * XXXIP: Handle fd based DIRECT_IO >+ */ >+ if (fuse_open_flags & FOPEN_DIRECT_IO) { >+ VTOFUD(vp)->flag |= FN_DIRECTIO; >+ } else { >+ VTOFUD(vp)->flag &= ~FN_DIRECTIO; >+ } >+ > if (vnode_vtype(vp) == VREG) { > /* XXXIP prevent getattr, by using cached node size */ > vnode_create_vobject(vp, 0, td); >Index: fuse_node.h >=================================================================== >--- fuse_node.h (revision 270029) >+++ fuse_node.h (working copy) >@@ -67,6 +67,7 @@ > #define FN_FLUSHINPROG 0x00000040 > #define FN_FLUSHWANT 0x00000080 > #define FN_SIZECHANGE 0x00000100 >+#define FN_DIRECTIO 0x00000200 > > struct fuse_vnode_data { > /** self **/ >Index: fuse_vnops.c >=================================================================== >--- fuse_vnops.c (revision 270029) >+++ fuse_vnops.c (working copy) >@@ -1173,6 +1173,11 @@ > if (fuse_isdeadfs(vp)) { > return ENXIO; > } >+ >+ if (VTOFUD(vp)->flag & FN_DIRECTIO) { >+ ioflag |= IO_DIRECT; >+ } >+ > return fuse_io_dispatch(vp, uio, ioflag, cred); > } > >@@ -1712,6 +1717,10 @@ > } > fuse_vnode_refreshsize(vp, cred); > >+ if (VTOFUD(vp)->flag & FN_DIRECTIO) { >+ ioflag |= IO_DIRECT; >+ } >+ > return fuse_io_dispatch(vp, uio, ioflag, cred); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192701
:
145860
|
146010
| 146279