View | Details | Raw Unified | Return to bug 192701 | Differences between
and this patch

Collapse All | Expand All

(-)fuse_node.c (-1 / +19 lines)
Lines 273-281 Link Here
273
         * Funcation is called for every vnode open.
273
         * Funcation is called for every vnode open.
274
         * Merge fuse_open_flags it may be 0
274
         * Merge fuse_open_flags it may be 0
275
         *
275
         *
276
         * XXXIP: Handle FOPEN_DIRECT_IO and FOPEN_KEEP_CACHE
276
         * XXXIP: Handle FOPEN_KEEP_CACHE
277
         */
277
         */
278
        /*
279
	  * Ideally speaking, direct io should be enabled on
280
         * fd's but do not see of any way of providing that
281
         * this implementation.
278
282
283
         * Also cannot think of a reason why would two
284
         * different fd's on same vnode would like
285
         * have DIRECT_IO turned on and off. But linux
286
         * based implementation works on an fd not an
287
         * inode and provides such a feature.
288
         *
289
         * XXXIP: Handle fd based DIRECT_IO
290
         */
291
	if (fuse_open_flags & FOPEN_DIRECT_IO) {
292
		VTOFUD(vp)->flag |= FN_DIRECTIO;
293
	} else {
294
	        VTOFUD(vp)->flag &= ~FN_DIRECTIO;
295
	}
296
279
	if (vnode_vtype(vp) == VREG) {
297
	if (vnode_vtype(vp) == VREG) {
280
		/* XXXIP prevent getattr, by using cached node size */
298
		/* XXXIP prevent getattr, by using cached node size */
281
		vnode_create_vobject(vp, 0, td);
299
		vnode_create_vobject(vp, 0, td);
(-)fuse_node.h (+1 lines)
Lines 67-72 Link Here
67
#define FN_FLUSHINPROG       0x00000040
67
#define FN_FLUSHINPROG       0x00000040
68
#define FN_FLUSHWANT         0x00000080
68
#define FN_FLUSHWANT         0x00000080
69
#define FN_SIZECHANGE        0x00000100
69
#define FN_SIZECHANGE        0x00000100
70
#define FN_DIRECTIO          0x00000200
70
71
71
struct fuse_vnode_data {
72
struct fuse_vnode_data {
72
    /** self **/
73
    /** self **/
(-)fuse_vnops.c (+9 lines)
Lines 1173-1178 Link Here
1173
	if (fuse_isdeadfs(vp)) {
1173
	if (fuse_isdeadfs(vp)) {
1174
		return ENXIO;
1174
		return ENXIO;
1175
	}
1175
	}
1176
1177
	if (VTOFUD(vp)->flag & FN_DIRECTIO) {
1178
		ioflag |= IO_DIRECT;
1179
	}
1180
1176
	return fuse_io_dispatch(vp, uio, ioflag, cred);
1181
	return fuse_io_dispatch(vp, uio, ioflag, cred);
1177
}
1182
}
1178
1183
Lines 1712-1717 Link Here
1712
	}
1717
	}
1713
	fuse_vnode_refreshsize(vp, cred);
1718
	fuse_vnode_refreshsize(vp, cred);
1714
1719
1720
	if (VTOFUD(vp)->flag & FN_DIRECTIO) {
1721
		ioflag |= IO_DIRECT;
1722
	}
1723
1715
	return fuse_io_dispatch(vp, uio, ioflag, cred);
1724
	return fuse_io_dispatch(vp, uio, ioflag, cred);
1716
}
1725
}
1717
1726

Return to bug 192701