diff options
Diffstat (limited to 'sys/fs/fuse/fuse_node.c')
-rw-r--r-- | sys/fs/fuse/fuse_node.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index ea10c96..a6119dd 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -273,8 +273,26 @@ fuse_vnode_open(struct vnode *vp, int32_t fuse_open_flags, struct thread *td) * 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 */ |