1229f9b9bSMiklos Szeredi /* SPDX-License-Identifier: GPL-2.0 */ 2229f9b9bSMiklos Szeredi 3229f9b9bSMiklos Szeredi #ifndef _FS_FUSE_ARGS_H 4229f9b9bSMiklos Szeredi #define _FS_FUSE_ARGS_H 5229f9b9bSMiklos Szeredi 6229f9b9bSMiklos Szeredi #include <linux/types.h> 7229f9b9bSMiklos Szeredi 8229f9b9bSMiklos Szeredi struct fuse_mount; 9229f9b9bSMiklos Szeredi 10229f9b9bSMiklos Szeredi /** One input argument of a request */ 11229f9b9bSMiklos Szeredi struct fuse_in_arg { 12229f9b9bSMiklos Szeredi unsigned size; 13229f9b9bSMiklos Szeredi const void *value; 14229f9b9bSMiklos Szeredi }; 15229f9b9bSMiklos Szeredi 16229f9b9bSMiklos Szeredi /** One output argument of a request */ 17229f9b9bSMiklos Szeredi struct fuse_arg { 18229f9b9bSMiklos Szeredi unsigned size; 19229f9b9bSMiklos Szeredi void *value; 20229f9b9bSMiklos Szeredi }; 21229f9b9bSMiklos Szeredi 22229f9b9bSMiklos Szeredi struct fuse_args { 23229f9b9bSMiklos Szeredi u64 nodeid; 24229f9b9bSMiklos Szeredi u32 opcode; 25229f9b9bSMiklos Szeredi u32 uid; 26229f9b9bSMiklos Szeredi u32 gid; 27229f9b9bSMiklos Szeredi u32 pid; 28229f9b9bSMiklos Szeredi u8 in_numargs; 29229f9b9bSMiklos Szeredi u8 out_numargs; 30229f9b9bSMiklos Szeredi u8 ext_idx; 31229f9b9bSMiklos Szeredi bool force:1; 32229f9b9bSMiklos Szeredi bool noreply:1; 33229f9b9bSMiklos Szeredi bool nocreds:1; 34229f9b9bSMiklos Szeredi bool in_pages:1; 35229f9b9bSMiklos Szeredi bool out_pages:1; 36229f9b9bSMiklos Szeredi bool user_pages:1; 37229f9b9bSMiklos Szeredi bool out_argvar:1; 38229f9b9bSMiklos Szeredi bool page_zeroing:1; 39229f9b9bSMiklos Szeredi bool page_replace:1; 40229f9b9bSMiklos Szeredi bool may_block:1; 41229f9b9bSMiklos Szeredi bool is_ext:1; 42229f9b9bSMiklos Szeredi bool is_pinned:1; 43229f9b9bSMiklos Szeredi bool invalidate_vmap:1; 44229f9b9bSMiklos Szeredi bool abort_on_kill:1; 45229f9b9bSMiklos Szeredi struct fuse_in_arg in_args[4]; 46229f9b9bSMiklos Szeredi struct fuse_arg out_args[2]; 47*a697d95fSMiklos Szeredi void (*end)(struct fuse_args *args, int error); 48229f9b9bSMiklos Szeredi /* Used for kvec iter backed by vmalloc address */ 49229f9b9bSMiklos Szeredi void *vmap_base; 50229f9b9bSMiklos Szeredi }; 51229f9b9bSMiklos Szeredi 52229f9b9bSMiklos Szeredi /** FUSE folio descriptor */ 53229f9b9bSMiklos Szeredi struct fuse_folio_desc { 54229f9b9bSMiklos Szeredi unsigned int length; 55229f9b9bSMiklos Szeredi unsigned int offset; 56229f9b9bSMiklos Szeredi }; 57229f9b9bSMiklos Szeredi 58229f9b9bSMiklos Szeredi struct fuse_args_pages { 59229f9b9bSMiklos Szeredi struct fuse_args args; 60229f9b9bSMiklos Szeredi struct folio **folios; 61229f9b9bSMiklos Szeredi struct fuse_folio_desc *descs; 62229f9b9bSMiklos Szeredi unsigned int num_folios; 63229f9b9bSMiklos Szeredi }; 64229f9b9bSMiklos Szeredi 65229f9b9bSMiklos Szeredi #endif /* _FS_FUSE_ARGS_H */ 66