1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #ifndef _FS_FUSE_ARGS_H 4 #define _FS_FUSE_ARGS_H 5 6 #include <linux/types.h> 7 8 struct fuse_mount; 9 10 /** One input argument of a request */ 11 struct fuse_in_arg { 12 unsigned size; 13 const void *value; 14 }; 15 16 /** One output argument of a request */ 17 struct fuse_arg { 18 unsigned size; 19 void *value; 20 }; 21 22 struct fuse_args { 23 u64 nodeid; 24 u32 opcode; 25 u32 uid; 26 u32 gid; 27 u32 pid; 28 u8 in_numargs; 29 u8 out_numargs; 30 u8 ext_idx; 31 bool force:1; 32 bool noreply:1; 33 bool nocreds:1; 34 bool in_pages:1; 35 bool out_pages:1; 36 bool user_pages:1; 37 bool out_argvar:1; 38 bool page_zeroing:1; 39 bool page_replace:1; 40 bool may_block:1; 41 bool is_ext:1; 42 bool is_pinned:1; 43 bool invalidate_vmap:1; 44 bool abort_on_kill:1; 45 struct fuse_in_arg in_args[4]; 46 struct fuse_arg out_args[2]; 47 void (*end)(struct fuse_mount *fm, struct fuse_args *args, int error); 48 /* Used for kvec iter backed by vmalloc address */ 49 void *vmap_base; 50 }; 51 52 /** FUSE folio descriptor */ 53 struct fuse_folio_desc { 54 unsigned int length; 55 unsigned int offset; 56 }; 57 58 struct fuse_args_pages { 59 struct fuse_args args; 60 struct folio **folios; 61 struct fuse_folio_desc *descs; 62 unsigned int num_folios; 63 }; 64 65 #endif /* _FS_FUSE_ARGS_H */ 66