History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse updates from Miklos Szeredi: "The biggest part of this pull request is a patch series from Maxim Patlasov to optimize scatter-gather direct IO. There's also the addition of a "readdirplus" API, poll events and various fixes and cleanups. There's a one line change outside of fuse to mm/filemap.c which makes the argument of iov_iter_single_seg_count() const, required by Maxim's patches." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (22 commits) fuse: allow control of adaptive readdirplus use Synchronize fuse header with one used in library fuse: send poll events fuse: don't WARN when nlink is zero fuse: avoid out-of-scope stack access fuse: bump version for READDIRPLUS FUSE: Adapt readdirplus to application usage patterns Do not use RCU for current process credentials fuse: cleanup fuse_direct_io() fuse: optimize __fuse_direct_io() fuse: optimize fuse_get_user_pages() fuse: pass iov[] to fuse_get_user_pages() mm: minor cleanup of iov_iter_single_seg_count() fuse: use req->page_descs[] for argpages cases fuse: add per-page descriptor <offset, length> to fuse_req fuse: rework fuse_do_ioctl() fuse: rework fuse_perform_write() fuse: rework fuse_readpages() fuse: rework fuse_retrieve() fuse: categorize fuse_get_req() ...

Linus Torvalds committed 13 years ago

Commit c4bc7052 parents 2608e3d 634734b9 files · +609 −180Browse files

Showing the changes to include/uapi/linux (1 of 9 files). Show all

Unified · Split

include/uapi/linux/fuse.h+57−3
@@ -1,9 +1,35 @@
1/*1/*
2 FUSE: Filesystem in Userspace2 This file defines the kernel interface of FUSE
3 Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>3 Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
4 4
5 This program can be distributed under the terms of the GNU GPL.5 This program can be distributed under the terms of the GNU GPL.
6 See the file COPYING.6 See the file COPYING.
7
8 This -- and only this -- header file may also be distributed under
9 the terms of the BSD Licence as follows:
10
11 Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions
15 are met:
16 1. Redistributions of source code must retain the above copyright
17 notice, this list of conditions and the following disclaimer.
18 2. Redistributions in binary form must reproduce the above copyright
19 notice, this list of conditions and the following disclaimer in the
20 documentation and/or other materials provided with the distribution.
21
22 THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
26 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 SUCH DAMAGE.
7*/33*/
8 34
9/*35/*
@@ -60,12 +86,25 @@ · 50 unmodified lines
60 *86 *
61 * 7.2087 * 7.20
62 * - add FUSE_AUTO_INVAL_DATA88 * - add FUSE_AUTO_INVAL_DATA
89 *
90 * 7.21
91 * - add FUSE_READDIRPLUS
92 * - send the requested events in POLL request
63 */93 */
64 94
65#ifndef _LINUX_FUSE_H95#ifndef _LINUX_FUSE_H
66#define _LINUX_FUSE_H96#define _LINUX_FUSE_H
67 97
98#ifdef __linux__
68#include <linux/types.h>99#include <linux/types.h>
100#else
101#include <stdint.h>
102#define __u64 uint64_t
103#define __s64 int64_t
104#define __u32 uint32_t
105#define __s32 int32_t
106#define __u16 uint16_t
107#endif
69 108
70/*109/*
71 * Version negotiation:110 * Version negotiation:
@@ -91,7 +130,7 @@ · 19 unmodified lines
91#define FUSE_KERNEL_VERSION 7130#define FUSE_KERNEL_VERSION 7
92 131
93/** Minor version number of this interface */132/** Minor version number of this interface */
94#define FUSE_KERNEL_MINOR_VERSION 20133#define FUSE_KERNEL_MINOR_VERSION 21
95 134
96/** The node ID of the root inode */135/** The node ID of the root inode */
97#define FUSE_ROOT_ID 1136#define FUSE_ROOT_ID 1
@@ -179,6 +218,8 @@ struct fuse_file_lock { · 81 unmodified lines
179 * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks218 * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks
180 * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories219 * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories
181 * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages220 * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages
221 * FUSE_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one)
222 * FUSE_READDIRPLUS_AUTO: adaptive readdirplus
182 */223 */
183#define FUSE_ASYNC_READ (1 << 0)224#define FUSE_ASYNC_READ (1 << 0)
184#define FUSE_POSIX_LOCKS (1 << 1)225#define FUSE_POSIX_LOCKS (1 << 1)
@@ -193,6 +234,8 @@ struct fuse_file_lock { · 8 unmodified lines
193#define FUSE_FLOCK_LOCKS (1 << 10)234#define FUSE_FLOCK_LOCKS (1 << 10)
194#define FUSE_HAS_IOCTL_DIR (1 << 11)235#define FUSE_HAS_IOCTL_DIR (1 << 11)
195#define FUSE_AUTO_INVAL_DATA (1 << 12)236#define FUSE_AUTO_INVAL_DATA (1 << 12)
237#define FUSE_DO_READDIRPLUS (1 << 13)
238#define FUSE_READDIRPLUS_AUTO (1 << 14)
196 239
197/**240/**
198 * CUSE INIT request/reply flags241 * CUSE INIT request/reply flags
@@ -299,6 +342,7 @@ enum fuse_opcode { · 100 unmodified lines
299 FUSE_NOTIFY_REPLY = 41,342 FUSE_NOTIFY_REPLY = 41,
300 FUSE_BATCH_FORGET = 42,343 FUSE_BATCH_FORGET = 42,
301 FUSE_FALLOCATE = 43,344 FUSE_FALLOCATE = 43,
345 FUSE_READDIRPLUS = 44,
302 346
303 /* CUSE specific operations */347 /* CUSE specific operations */
304 CUSE_INIT = 4096,348 CUSE_INIT = 4096,
@@ -580,7 +624,7 @@ struct fuse_poll_in { · 275 unmodified lines
580 __u64 fh;624 __u64 fh;
581 __u64 kh;625 __u64 kh;
582 __u32 flags;626 __u32 flags;
583 __u32 padding;627 __u32 events;
584};628};
585 629
586struct fuse_poll_out {630struct fuse_poll_out {
@@ -630,6 +674,16 @@ struct fuse_dirent { · 43 unmodified lines
630#define FUSE_DIRENT_SIZE(d) \674#define FUSE_DIRENT_SIZE(d) \
631 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)675 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
632 676
677struct fuse_direntplus {
678 struct fuse_entry_out entry_out;
679 struct fuse_dirent dirent;
680};
681
682#define FUSE_NAME_OFFSET_DIRENTPLUS \
683 offsetof(struct fuse_direntplus, dirent.name)
684#define FUSE_DIRENTPLUS_SIZE(d) \
685 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
686
633struct fuse_notify_inval_inode_out {687struct fuse_notify_inval_inode_out {
634 __u64 ino;688 __u64 ino;
635 __s64 off;689 __s64 off;