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

Collapse All | Expand All

(-)fuse_node.c (-2 / +5 lines)
Lines 273-280 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
	if (fuse_open_flags & FOPEN_DIRECT_IO) {
279
		VTOFUD(vp)->flag |= FN_DIRECTIO;
280
	}
278
281
279
	if (vnode_vtype(vp) == VREG) {
282
	if (vnode_vtype(vp) == VREG) {
280
		/* XXXIP prevent getattr, by using cached node size */
283
		/* XXXIP prevent getattr, by using cached node size */
Lines 314-320 Link Here
314
	fsai->valid = 0;
317
	fsai->valid = 0;
315
318
316
	/* Truncate to a new value. */
319
	/* Truncate to a new value. */
317
	    fsai->size = fvdat->filesize;
320
	fsai->size = fvdat->filesize;
318
	fsai->valid |= FATTR_SIZE;
321
	fsai->valid |= FATTR_SIZE;
319
322
320
	fuse_filehandle_getrw(vp, FUFH_WRONLY, &fufh);
323
	fuse_filehandle_getrw(vp, FUFH_WRONLY, &fufh);
(-)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