aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2018-08-21 08:36:31 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2018-09-28 10:43:22 -0400
commit88bc7d5097a11d9bdcf08ecf85c81ba998353437 (patch)
tree40bceda7dc1db073a51d8ed34675073fbf70dfd0 /include/uapi
parent908a572b80f6e9577b45e81b3dfe2e22111286b8 (diff)
fuse: add support for copy_file_range()
There are several FUSE filesystems that can implement server-side copy or other efficient copy/duplication/clone methods. The copy_file_range() syscall is the standard interface that users have access to while not depending on external libraries that bypass FUSE. Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/fuse.h106
1 files changed, 60 insertions, 46 deletions
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 92fa24c24c92..d27b50a44f74 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -116,6 +116,9 @@
116 * 116 *
117 * 7.27 117 * 7.27
118 * - add FUSE_ABORT_ERROR 118 * - add FUSE_ABORT_ERROR
119 *
120 * 7.28
121 * - add FUSE_COPY_FILE_RANGE
119 */ 122 */
120 123
121#ifndef _LINUX_FUSE_H 124#ifndef _LINUX_FUSE_H
@@ -151,7 +154,7 @@
151#define FUSE_KERNEL_VERSION 7 154#define FUSE_KERNEL_VERSION 7
152 155
153/** Minor version number of this interface */ 156/** Minor version number of this interface */
154#define FUSE_KERNEL_MINOR_VERSION 27 157#define FUSE_KERNEL_MINOR_VERSION 28
155 158
156/** The node ID of the root inode */ 159/** The node ID of the root inode */
157#define FUSE_ROOT_ID 1 160#define FUSE_ROOT_ID 1
@@ -337,53 +340,54 @@ struct fuse_file_lock {
337#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) 340#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
338 341
339enum fuse_opcode { 342enum fuse_opcode {
340 FUSE_LOOKUP = 1, 343 FUSE_LOOKUP = 1,
341 FUSE_FORGET = 2, /* no reply */ 344 FUSE_FORGET = 2, /* no reply */
342 FUSE_GETATTR = 3, 345 FUSE_GETATTR = 3,
343 FUSE_SETATTR = 4, 346 FUSE_SETATTR = 4,
344 FUSE_READLINK = 5, 347 FUSE_READLINK = 5,
345 FUSE_SYMLINK = 6, 348 FUSE_SYMLINK = 6,
346 FUSE_MKNOD = 8, 349 FUSE_MKNOD = 8,
347 FUSE_MKDIR = 9, 350 FUSE_MKDIR = 9,
348 FUSE_UNLINK = 10, 351 FUSE_UNLINK = 10,
349 FUSE_RMDIR = 11, 352 FUSE_RMDIR = 11,
350 FUSE_RENAME = 12, 353 FUSE_RENAME = 12,
351 FUSE_LINK = 13, 354 FUSE_LINK = 13,
352 FUSE_OPEN = 14, 355 FUSE_OPEN = 14,
353 FUSE_READ = 15, 356 FUSE_READ = 15,
354 FUSE_WRITE = 16, 357 FUSE_WRITE = 16,
355 FUSE_STATFS = 17, 358 FUSE_STATFS = 17,
356 FUSE_RELEASE = 18, 359 FUSE_RELEASE = 18,
357 FUSE_FSYNC = 20, 360 FUSE_FSYNC = 20,
358 FUSE_SETXATTR = 21, 361 FUSE_SETXATTR = 21,
359 FUSE_GETXATTR = 22, 362 FUSE_GETXATTR = 22,
360 FUSE_LISTXATTR = 23, 363 FUSE_LISTXATTR = 23,
361 FUSE_REMOVEXATTR = 24, 364 FUSE_REMOVEXATTR = 24,
362 FUSE_FLUSH = 25, 365 FUSE_FLUSH = 25,
363 FUSE_INIT = 26, 366 FUSE_INIT = 26,
364 FUSE_OPENDIR = 27, 367 FUSE_OPENDIR = 27,
365 FUSE_READDIR = 28, 368 FUSE_READDIR = 28,
366 FUSE_RELEASEDIR = 29, 369 FUSE_RELEASEDIR = 29,
367 FUSE_FSYNCDIR = 30, 370 FUSE_FSYNCDIR = 30,
368 FUSE_GETLK = 31, 371 FUSE_GETLK = 31,
369 FUSE_SETLK = 32, 372 FUSE_SETLK = 32,
370 FUSE_SETLKW = 33, 373 FUSE_SETLKW = 33,
371 FUSE_ACCESS = 34, 374 FUSE_ACCESS = 34,
372 FUSE_CREATE = 35, 375 FUSE_CREATE = 35,
373 FUSE_INTERRUPT = 36, 376 FUSE_INTERRUPT = 36,
374 FUSE_BMAP = 37, 377 FUSE_BMAP = 37,
375 FUSE_DESTROY = 38, 378 FUSE_DESTROY = 38,
376 FUSE_IOCTL = 39, 379 FUSE_IOCTL = 39,
377 FUSE_POLL = 40, 380 FUSE_POLL = 40,
378 FUSE_NOTIFY_REPLY = 41, 381 FUSE_NOTIFY_REPLY = 41,
379 FUSE_BATCH_FORGET = 42, 382 FUSE_BATCH_FORGET = 42,
380 FUSE_FALLOCATE = 43, 383 FUSE_FALLOCATE = 43,
381 FUSE_READDIRPLUS = 44, 384 FUSE_READDIRPLUS = 44,
382 FUSE_RENAME2 = 45, 385 FUSE_RENAME2 = 45,
383 FUSE_LSEEK = 46, 386 FUSE_LSEEK = 46,
387 FUSE_COPY_FILE_RANGE = 47,
384 388
385 /* CUSE specific operations */ 389 /* CUSE specific operations */
386 CUSE_INIT = 4096, 390 CUSE_INIT = 4096,
387}; 391};
388 392
389enum fuse_notify_code { 393enum fuse_notify_code {
@@ -792,4 +796,14 @@ struct fuse_lseek_out {
792 uint64_t offset; 796 uint64_t offset;
793}; 797};
794 798
799struct fuse_copy_file_range_in {
800 uint64_t fh_in;
801 uint64_t off_in;
802 uint64_t nodeid_out;
803 uint64_t fh_out;
804 uint64_t off_out;
805 uint64_t len;
806 uint64_t flags;
807};
808
795#endif /* _LINUX_FUSE_H */ 809#endif /* _LINUX_FUSE_H */