FreeBSD Bugzilla – Attachment 145860 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
fuse_direct_io.patch (text/plain), 1.68 KB, created by
Harshavardhana
on 2014-08-16 09:10:53 UTC
(
hide
)
Description:
FUSE honor FOPEN_DIRECT_IO
Filename:
MIME Type:
Creator:
Harshavardhana
Created:
2014-08-16 09:10:53 UTC
Size:
1.68 KB
patch
obsolete
>Index: fuse_node.c >=================================================================== >--- fuse_node.c (revision 270029) >+++ fuse_node.c (working copy) >@@ -273,8 +273,11 @@ > * 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 > */ >+ if (fuse_open_flags & FOPEN_DIRECT_IO) { >+ VTOFUD(vp)->flag |= FN_DIRECTIO; >+ } > > if (vnode_vtype(vp) == VREG) { > /* XXXIP prevent getattr, by using cached node size */ >@@ -314,7 +317,7 @@ > fsai->valid = 0; > > /* Truncate to a new value. */ >- fsai->size = fvdat->filesize; >+ fsai->size = fvdat->filesize; > fsai->valid |= FATTR_SIZE; > > fuse_filehandle_getrw(vp, FUFH_WRONLY, &fufh); >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