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() ...
Showing the changes to include/uapi/linux (1 of 9 files). Show all
Unified · Split
| @@ -1,9 +1,35 @@ | ||
| 1 | 1 | /* |
| 2 | − FUSE: Filesystem in Userspace | |
| 2 | + This file defines the kernel interface of FUSE | |
| 3 | 3 | Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> |
| 4 | 4 | |
| 5 | 5 | This program can be distributed under the terms of the GNU GPL. |
| 6 | 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 | 87 | * 7.20 |
| 62 | 88 | * - 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 | 95 | #ifndef _LINUX_FUSE_H |
| 66 | 96 | #define _LINUX_FUSE_H |
| 67 | 97 | |
| 98 | +#ifdef __linux__ | |
| 68 | 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 | 110 | * Version negotiation: |
| @@ -91,7 +130,7 @@ · 19 unmodified lines | ||
| 91 | 130 | #define FUSE_KERNEL_VERSION 7 |
| 92 | 131 | |
| 93 | 132 | /** Minor version number of this interface */ |
| 94 | −#define FUSE_KERNEL_MINOR_VERSION 20 | |
| 133 | +#define FUSE_KERNEL_MINOR_VERSION 21 | |
| 95 | 134 | |
| 96 | 135 | /** The node ID of the root inode */ |
| 97 | 136 | #define FUSE_ROOT_ID 1 |
| @@ -179,6 +218,8 @@ struct fuse_file_lock { · 81 unmodified lines | ||
| 179 | 218 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks |
| 180 | 219 | * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories |
| 181 | 220 | * 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 | 224 | #define FUSE_ASYNC_READ (1 << 0) |
| 184 | 225 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -193,6 +234,8 @@ struct fuse_file_lock { · 8 unmodified lines | ||
| 193 | 234 | #define FUSE_FLOCK_LOCKS (1 << 10) |
| 194 | 235 | #define FUSE_HAS_IOCTL_DIR (1 << 11) |
| 195 | 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 | 241 | * CUSE INIT request/reply flags |
| @@ -299,6 +342,7 @@ enum fuse_opcode { · 100 unmodified lines | ||
| 299 | 342 | FUSE_NOTIFY_REPLY = 41, |
| 300 | 343 | FUSE_BATCH_FORGET = 42, |
| 301 | 344 | FUSE_FALLOCATE = 43, |
| 345 | + FUSE_READDIRPLUS = 44, | |
| 302 | 346 | |
| 303 | 347 | /* CUSE specific operations */ |
| 304 | 348 | CUSE_INIT = 4096, |
| @@ -580,7 +624,7 @@ struct fuse_poll_in { · 275 unmodified lines | ||
| 580 | 624 | __u64 fh; |
| 581 | 625 | __u64 kh; |
| 582 | 626 | __u32 flags; |
| 583 | − __u32 padding; | |
| 627 | + __u32 events; | |
| 584 | 628 | }; |
| 585 | 629 | |
| 586 | 630 | struct fuse_poll_out { |
| @@ -630,6 +674,16 @@ struct fuse_dirent { · 43 unmodified lines | ||
| 630 | 674 | #define FUSE_DIRENT_SIZE(d) \ |
| 631 | 675 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
| 632 | 676 | |
| 677 | +struct 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 | + | |
| 633 | 687 | struct fuse_notify_inval_inode_out { |
| 634 | 688 | __u64 ino; |
| 635 | 689 | __s64 off; |