1/*
2 * Copyright (c) 2007-2009 Google Inc. and Amit Singh
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
--- 40 unchanged lines hidden (view full) ---
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 */
55
56#include <sys/cdefs.h>
57__FBSDID("$FreeBSD: head/sys/fs/fuse/fuse_node.c 299816 2016-05-15 00:45:17Z rmacklem $");
58
59#include <sys/types.h>
60#include <sys/module.h>
61#include <sys/systm.h>
62#include <sys/errno.h>
63#include <sys/param.h>
64#include <sys/kernel.h>
65#include <sys/conf.h>
--- 218 unchanged lines hidden (view full) ---
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 ASSERT_VOP_ELOCKED(vp, __func__);
293 VTOFUD(vp)->flag |= FN_DIRECTIO;
294 fuse_io_invalbuf(vp, td);
295 } else {
296 VTOFUD(vp)->flag &= ~FN_DIRECTIO;
297 }
298
299 if (vnode_vtype(vp) == VREG) {
300 /* XXXIP prevent getattr, by using cached node size */
301 vnode_create_vobject(vp, 0, td);
302 }
--- 87 unchanged lines hidden ---
2 * Copyright (c) 2007-2009 Google Inc. and Amit Singh
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
--- 40 unchanged lines hidden (view full) ---
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 */
55
56#include <sys/cdefs.h>
57__FBSDID("$FreeBSD: head/sys/fs/fuse/fuse_node.c 299816 2016-05-15 00:45:17Z rmacklem $");
58
59#include <sys/types.h>
60#include <sys/module.h>
61#include <sys/systm.h>
62#include <sys/errno.h>
63#include <sys/param.h>
64#include <sys/kernel.h>
65#include <sys/conf.h>
--- 218 unchanged lines hidden (view full) ---
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 ASSERT_VOP_ELOCKED(vp, __func__);
293 VTOFUD(vp)->flag |= FN_DIRECTIO;
294 fuse_io_invalbuf(vp, td);
295 } else {
296 VTOFUD(vp)->flag &= ~FN_DIRECTIO;
297 }
298
299 if (vnode_vtype(vp) == VREG) {
300 /* XXXIP prevent getattr, by using cached node size */
301 vnode_create_vobject(vp, 0, td);
302 }
--- 87 unchanged lines hidden ---