1 /* $NetBSD: puffs_msgif.h,v 1.84 2015/02/15 20:21:29 manu Exp $ */
4 * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
6 * Development of this software was supported by the
7 * Google Summer of Code program and the Ulla Tuominen Foundation.
8 * The Google SoC project was mentored by Bill Studenmund.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 #ifndef _FS_PUFFS_PUFFS_MSGIF_H_
33 #define _FS_PUFFS_PUFFS_MSGIF_H_
35 #include <sys/param.h>
37 #include <sys/ioccom.h>
39 #include <sys/vnode.h>
40 #include <sys/ucred.h>
41 #include <sys/statvfs.h>
42 #include <sys/dirent.h>
43 #include <sys/fcntl.h>
46 #include <dev/putter/putter.h>
47 #endif /* !defined(__minix) */
49 #include <uvm/uvm_prot.h>
51 #define PUFFSOP_VFS 0x01 /* kernel-> */
52 #define PUFFSOP_VN 0x02 /* kernel-> */
53 #define PUFFSOP_CACHE 0x03 /* only kernel-> */
54 #define PUFFSOP_ERROR 0x04 /* only kernel-> */
55 #define PUFFSOP_FLUSH 0x05 /* ->kernel */
56 #define PUFFSOP_SUSPEND 0x06 /* ->kernel */
57 #define PUFFSOP_UNMOUNT 0x07 /* ->kernel */
59 #define PUFFSOPFLAG_FAF 0x10 /* fire-and-forget */
60 #define PUFFSOPFLAG_ISRESPONSE 0x20 /* req is actually a resp */
62 #define PUFFSOP_OPCMASK 0x07
63 #define PUFFSOP_OPCLASS(a) ((a) & PUFFSOP_OPCMASK)
64 #define PUFFSOP_WANTREPLY(a) (((a) & PUFFSOPFLAG_FAF) == 0)
67 PUFFS_VFS_MOUNT
, PUFFS_VFS_START
, PUFFS_VFS_UNMOUNT
,
68 PUFFS_VFS_ROOT
, PUFFS_VFS_QUOTACTL
, PUFFS_VFS_STATVFS
,
69 PUFFS_VFS_SYNC
, PUFFS_VFS_VGET
, PUFFS_VFS_FHTOVP
,
70 PUFFS_VFS_VPTOFH
, PUFFS_VFS_INIT
, PUFFS_VFS_DONE
,
71 PUFFS_VFS_SNAPSHOT
, PUFFS_VFS_EXTATTRCTL
, PUFFS_VFS_SUSPEND
73 #define PUFFS_VFS_MAX PUFFS_VFS_SUSPEND
76 PUFFS_VN_LOOKUP
, PUFFS_VN_CREATE
, PUFFS_VN_MKNOD
,
77 PUFFS_VN_OPEN
, PUFFS_VN_CLOSE
, PUFFS_VN_ACCESS
,
78 PUFFS_VN_GETATTR
, PUFFS_VN_SETATTR
, PUFFS_VN_READ
,
79 PUFFS_VN_WRITE
, PUFFS_VN_IOCTL
, PUFFS_VN_FCNTL
,
80 PUFFS_VN_POLL
, PUFFS_VN_KQFILTER
, PUFFS_VN_REVOKE
,
81 PUFFS_VN_MMAP
, PUFFS_VN_FSYNC
, PUFFS_VN_SEEK
,
82 PUFFS_VN_REMOVE
, PUFFS_VN_LINK
, PUFFS_VN_RENAME
,
83 PUFFS_VN_MKDIR
, PUFFS_VN_RMDIR
, PUFFS_VN_SYMLINK
,
84 PUFFS_VN_READDIR
, PUFFS_VN_READLINK
, PUFFS_VN_ABORTOP
,
85 PUFFS_VN_INACTIVE
, PUFFS_VN_RECLAIM
, PUFFS_VN_LOCK
,
86 PUFFS_VN_UNLOCK
, PUFFS_VN_BMAP
, PUFFS_VN_STRATEGY
,
87 PUFFS_VN_PRINT
, PUFFS_VN_ISLOCKED
, PUFFS_VN_PATHCONF
,
88 PUFFS_VN_ADVLOCK
, PUFFS_VN_LEASE
, PUFFS_VN_WHITEOUT
,
89 PUFFS_VN_GETPAGES
, PUFFS_VN_PUTPAGES
, PUFFS_VN_GETEXTATTR
,
90 PUFFS_VN_LISTEXTATTR
, PUFFS_VN_OPENEXTATTR
, PUFFS_VN_DELETEEXTATTR
,
91 PUFFS_VN_SETEXTATTR
, PUFFS_VN_CLOSEEXTATTR
, PUFFS_VN_FALLOCATE
,
93 /* NOTE: If you add an op, decrement PUFFS_VN_SPARE accordingly */
95 #define PUFFS_VN_MAX PUFFS_VN_FDISCARD
96 #define PUFFS_VN_SPARE 30
99 * These signal invalid parameters the file system returned.
103 PUFFS_ERR_MAKENODE
, PUFFS_ERR_LOOKUP
, PUFFS_ERR_READDIR
,
104 PUFFS_ERR_READLINK
, PUFFS_ERR_READ
, PUFFS_ERR_WRITE
,
105 PUFFS_ERR_VPTOFH
, PUFFS_ERR_GETEXTATTR
, PUFFS_ERR_LISTEXTATTR
107 #define PUFFS_ERR_MAX PUFFS_ERR_LISTEXTATTR
109 #define PUFFSVERSION 30
110 #define PUFFSNAMESIZE 32
112 #define PUFFS_TYPEPREFIX "puffs|"
114 #define PUFFS_TYPELEN (_VFS_NAMELEN - (sizeof(PUFFS_TYPEPREFIX)+1))
115 #define PUFFS_NAMELEN (_VFS_MNAMELEN-1)
118 * Just a weak typedef for code clarity. Additionally, we have a
119 * more appropriate vanity type for puffs:
120 * <uep> it should be croissant, not cookie.
122 typedef void *puffs_cookie_t
;
123 typedef puffs_cookie_t puffs_croissant_t
;
126 unsigned int pa_vers
;
137 uint8_t pa_vnopmask
[PUFFS_VN_MAX
+ PUFFS_VN_SPARE
];
139 char pa_typename
[_VFS_NAMELEN
];
140 char pa_mntfromname
[_VFS_MNAMELEN
];
142 puffs_cookie_t pa_root_cookie
;
143 enum vtype pa_root_vtype
;
144 voff_t pa_root_vsize
;
150 struct statvfs pa_svfsb
;
154 uint32_t pa_spare
[127];
156 #define pa_root_rdev devunion.dev
158 #define PUFFS_KFLAG_NOCACHE_NAME 0x001 /* don't use name cache */
159 #define PUFFS_KFLAG_NOCACHE_PAGE 0x002 /* don't use page cache */
160 #define PUFFS_KFLAG_NOCACHE 0x003 /* no cache whatsoever */
161 #define PUFFS_KFLAG_ALLOPS 0x004 /* ignore pa_vnopmask */
162 #define PUFFS_KFLAG_WTCACHE 0x008 /* write-through page cache */
163 #define PUFFS_KFLAG_IAONDEMAND 0x010 /* inactive only on demand */
164 #define PUFFS_KFLAG_LOOKUP_FULLPNBUF 0x020 /* full pnbuf in lookup */
165 #define PUFFS_KFLAG_NOCACHE_ATTR 0x040 /* no attrib cache (unused) */
166 #define PUFFS_KFLAG_CACHE_FS_TTL 0x080 /* cache use TTL from FS */
167 #define PUFFS_KFLAG_CACHE_DOTDOT 0x100 /* don't send lookup for .. */
168 #define PUFFS_KFLAG_NOFLUSH_META 0x200 /* don't flush metadata cache*/
169 #define PUFFS_KFLAG_MASK 0x3bf
171 #define PUFFS_FHFLAG_DYNAMIC 0x01
172 #define PUFFS_FHFLAG_NFSV2 0x02
173 #define PUFFS_FHFLAG_NFSV3 0x04
174 #define PUFFS_FHFLAG_PROTOMASK 0x06
175 #define PUFFS_FHFLAG_PASSTHROUGH 0x08
176 #define PUFFS_FHFLAG_MASK 0x0f
178 #define PUFFS_FHSIZE_MAX 1020 /* FHANDLE_SIZE_MAX - 4 */
181 #if !defined(__minix)
182 struct putter_hdr preq_pth
;
183 #endif /* ! defined(__minix) */
186 puffs_cookie_t preq_cookie
;
188 uint16_t preq_opclass
;
189 uint16_t preq_optype
;
192 uint32_t preq_setbacks
;
194 /* Who is making the call? Eventually host id is also needed. */
199 * the following helper pads the struct size to md alignment
200 * multiple (should size_t not cut it). it makes sure that
201 * whatever comes after this struct is aligned
204 uint8_t preq_buf
[0] __aligned(ALIGNBYTES
+1);
207 #define PUFFS_SETBACK_INACT_N1 0x01 /* set VOP_INACTIVE for node 1 */
208 #define PUFFS_SETBACK_INACT_N2 0x02 /* set VOP_INACTIVE for node 2 */
209 #define PUFFS_SETBACK_NOREF_N1 0x04 /* set pn PN_NOREFS for node 1 */
210 #define PUFFS_SETBACK_NOREF_N2 0x08 /* set pn PN_NOREFS for node 2 */
211 #define PUFFS_SETBACK_MASK 0x0f
214 * Flush operation. This can be used to invalidate:
215 * 1) name cache for one node
216 * 2) name cache for all children
217 * 3) name cache for the entire mount
218 * 4) page cache for a set of ranges in one node
219 * 5) page cache for one entire node
221 * It can be used to flush:
222 * 1) page cache for a set of ranges in one node
223 * 2) page cache for one entire node
227 struct puffs_req pf_req
;
229 puffs_cookie_t pf_cookie
;
235 #define PUFFS_INVAL_NAMECACHE_NODE 0
236 #define PUFFS_INVAL_NAMECACHE_DIR 1
237 #define PUFFS_INVAL_NAMECACHE_ALL 2
238 #define PUFFS_INVAL_PAGECACHE_NODE_RANGE 3
239 #define PUFFS_FLUSH_PAGECACHE_NODE_RANGE 4
242 * Credentials for an operation. Can be either struct uucred for
243 * ops called from a credential context or NOCRED/FSCRED for ops
244 * called from within the kernel. It is up to the implementation
245 * if it makes a difference between these two and the super-user.
248 struct uucred pkcr_uuc
;
250 uint8_t pkcr_internal
;
252 #define PUFFCRED_TYPE_UUC 1
253 #define PUFFCRED_TYPE_INTERNAL 2
254 #define PUFFCRED_CRED_NOCRED 1
255 #define PUFFCRED_CRED_FSCRED 2
258 * 2*MAXPHYS is the max size the system will attempt to copy,
259 * else treated as garbage
261 #define PUFFS_MSG_MAXSIZE 2*MAXPHYS
262 #define PUFFS_MSGSTRUCT_MAX 4096 /* approximate */
264 #define PUFFS_EXTNAMELEN KERNEL_NAME_MAX /* currently same as EXTATTR_MAXNAMELEN */
266 #define PUFFS_TOMOVE(a,b) (MIN((a), b->pmp_msg_maxsize - PUFFS_MSGSTRUCT_MAX))
268 /* puffs struct componentname built by kernel */
271 uint32_t pkcn_nameiop
; /* namei operation */
272 uint32_t pkcn_flags
; /* flags */
274 char pkcn_name
[MAXPATHLEN
]; /* nulterminated path component */
275 size_t pkcn_namelen
; /* current component length */
276 size_t pkcn_consume
; /* IN: extra chars server ate */
281 * Next come the individual requests. They are all subclassed from
282 * puffs_req and contain request-specific fields in addition. Note
283 * that there are some requests which have to handle arbitrary-length
286 * The division is the following: puffs_req is to be touched only
287 * by generic routines while the other stuff is supposed to be
288 * modified only by specific routines.
292 * aux structures for vfs operations.
294 struct puffs_vfsmsg_unmount
{
295 struct puffs_req pvfsr_pr
;
300 struct puffs_vfsmsg_statvfs
{
301 struct puffs_req pvfsr_pr
;
303 struct statvfs pvfsr_sb
;
306 struct puffs_vfsmsg_sync
{
307 struct puffs_req pvfsr_pr
;
309 struct puffs_kcred pvfsr_cred
;
313 struct puffs_vfsmsg_fhtonode
{
314 struct puffs_req pvfsr_pr
;
316 void *pvfsr_fhcookie
; /* IN */
317 enum vtype pvfsr_vtype
; /* IN */
318 voff_t pvfsr_size
; /* IN */
319 dev_t pvfsr_rdev
; /* IN */
321 size_t pvfsr_dsize
; /* OUT */
322 uint8_t pvfsr_data
[0] /* OUT, XXX */
323 __aligned(ALIGNBYTES
+1);
326 struct puffs_vfsmsg_nodetofh
{
327 struct puffs_req pvfsr_pr
;
329 void *pvfsr_fhcookie
; /* OUT */
331 size_t pvfsr_dsize
; /* OUT/IN */
332 uint8_t pvfsr_data
[0] /* IN, XXX */
333 __aligned(ALIGNBYTES
+1);
336 struct puffs_vfsmsg_suspend
{
337 struct puffs_req pvfsr_pr
;
341 #define PUFFS_SUSPEND_START 0
342 #define PUFFS_SUSPEND_SUSPENDED 1
343 #define PUFFS_SUSPEND_RESUME 2
344 #define PUFFS_SUSPEND_ERROR 3
346 #define PUFFS_EXTATTRCTL_HASNODE 0x01
347 #define PUFFS_EXTATTRCTL_HASATTRNAME 0x02
349 #define PUFFS_OPEN_IO_DIRECT 0x01
351 struct puffs_vfsmsg_extattrctl
{
352 struct puffs_req pvfsr_pr
;
354 int pvfsr_cmd
; /* OUT */
355 int pvfsr_attrnamespace
; /* OUT */
356 int pvfsr_flags
; /* OUT */
357 char pvfsr_attrname
[PUFFS_EXTNAMELEN
]; /* OUT */
361 * aux structures for vnode operations.
364 struct puffs_vnmsg_lookup
{
365 struct puffs_req pvn_pr
;
367 struct puffs_kcn pvnr_cn
; /* OUT */
368 struct puffs_kcred pvnr_cn_cred
; /* OUT */
370 puffs_cookie_t pvnr_newnode
; /* IN */
371 enum vtype pvnr_vtype
; /* IN */
372 voff_t pvnr_size
; /* IN */
373 dev_t pvnr_rdev
; /* IN */
374 /* Used only if PUFFS_KFLAG_CACHE_USE_TTL */
375 struct vattr pvnr_va
; /* IN */
376 struct timespec pvnr_va_ttl
; /* IN */
377 struct timespec pvnr_cn_ttl
; /* IN */
380 struct puffs_vnmsg_create
{
381 struct puffs_req pvn_pr
;
383 struct puffs_kcn pvnr_cn
; /* OUT */
384 struct puffs_kcred pvnr_cn_cred
; /* OUT */
386 struct vattr pvnr_va
; /* OUT */
387 puffs_cookie_t pvnr_newnode
; /* IN */
388 /* Used only if PUFFS_KFLAG_CACHE_USE_TTL */
389 struct timespec pvnr_va_ttl
; /* IN */
390 struct timespec pvnr_cn_ttl
; /* IN */
393 struct puffs_vnmsg_mknod
{
394 struct puffs_req pvn_pr
;
396 struct puffs_kcn pvnr_cn
; /* OUT */
397 struct puffs_kcred pvnr_cn_cred
; /* OUT */
399 struct vattr pvnr_va
; /* OUT */
400 puffs_cookie_t pvnr_newnode
; /* IN */
401 /* Used only if PUFFS_KFLAG_CACHE_USE_TTL */
402 struct timespec pvnr_va_ttl
; /* IN */
403 struct timespec pvnr_cn_ttl
; /* IN */
406 struct puffs_vnmsg_open
{
407 struct puffs_req pvn_pr
;
409 struct puffs_kcred pvnr_cred
; /* OUT */
410 int pvnr_mode
; /* OUT */
411 int pvnr_oflags
; /* IN */
414 struct puffs_vnmsg_close
{
415 struct puffs_req pvn_pr
;
417 struct puffs_kcred pvnr_cred
; /* OUT */
418 int pvnr_fflag
; /* OUT */
421 struct puffs_vnmsg_access
{
422 struct puffs_req pvn_pr
;
424 struct puffs_kcred pvnr_cred
; /* OUT */
425 int pvnr_mode
; /* OUT */
428 #define puffs_vnmsg_setattr puffs_vnmsg_setgetattr
429 #define puffs_vnmsg_getattr puffs_vnmsg_setgetattr
430 struct puffs_vnmsg_setgetattr
{
431 struct puffs_req pvn_pr
;
433 struct puffs_kcred pvnr_cred
; /* OUT */
434 struct vattr pvnr_va
; /* IN/OUT (op depend) */
435 /* Used only if PUFFS_KFLAG_CACHE_USE_TTL */
436 struct timespec pvnr_va_ttl
; /* IN */
439 #define puffs_vnmsg_read puffs_vnmsg_rw
440 #define puffs_vnmsg_write puffs_vnmsg_rw
441 struct puffs_vnmsg_rw
{
442 struct puffs_req pvn_pr
;
444 struct puffs_kcred pvnr_cred
; /* OUT */
445 off_t pvnr_offset
; /* OUT */
446 size_t pvnr_resid
; /* IN/OUT */
447 int pvnr_ioflag
; /* OUT */
449 uint8_t pvnr_data
[0]; /* IN/OUT (wr/rd) */
452 #define puffs_vnmsg_ioctl puffs_vnreq_fcnioctl
453 #define puffs_vnmsg_fcntl puffs_vnreq_fcnioctl
454 struct puffs_vnmsg_fcnioctl
{
455 struct puffs_req pvn_pr
;
457 struct puffs_kcred pvnr_cred
;
467 struct puffs_vnmsg_poll
{
468 struct puffs_req pvn_pr
;
470 int pvnr_events
; /* IN/OUT */
473 struct puffs_vnmsg_fsync
{
474 struct puffs_req pvn_pr
;
476 struct puffs_kcred pvnr_cred
; /* OUT */
477 off_t pvnr_offlo
; /* OUT */
478 off_t pvnr_offhi
; /* OUT */
479 int pvnr_flags
; /* OUT */
482 struct puffs_vnmsg_seek
{
483 struct puffs_req pvn_pr
;
485 struct puffs_kcred pvnr_cred
; /* OUT */
486 off_t pvnr_oldoff
; /* OUT */
487 off_t pvnr_newoff
; /* OUT */
490 struct puffs_vnmsg_remove
{
491 struct puffs_req pvn_pr
;
493 struct puffs_kcn pvnr_cn
; /* OUT */
494 struct puffs_kcred pvnr_cn_cred
; /* OUT */
496 puffs_cookie_t pvnr_cookie_targ
; /* OUT */
499 struct puffs_vnmsg_mkdir
{
500 struct puffs_req pvn_pr
;
502 struct puffs_kcn pvnr_cn
; /* OUT */
503 struct puffs_kcred pvnr_cn_cred
; /* OUT */
505 struct vattr pvnr_va
; /* OUT */
506 puffs_cookie_t pvnr_newnode
; /* IN */
507 /* Used only if PUFFS_KFLAG_CACHE_USE_TTL */
508 struct timespec pvnr_va_ttl
; /* IN */
509 struct timespec pvnr_cn_ttl
; /* IN */
512 struct puffs_vnmsg_rmdir
{
513 struct puffs_req pvn_pr
;
515 struct puffs_kcn pvnr_cn
; /* OUT */
516 struct puffs_kcred pvnr_cn_cred
; /* OUT */
518 puffs_cookie_t pvnr_cookie_targ
; /* OUT */
521 struct puffs_vnmsg_link
{
522 struct puffs_req pvn_pr
;
524 struct puffs_kcn pvnr_cn
; /* OUT */
525 struct puffs_kcred pvnr_cn_cred
; /* OUT */
527 puffs_cookie_t pvnr_cookie_targ
; /* OUT */
530 struct puffs_vnmsg_rename
{
531 struct puffs_req pvn_pr
;
533 struct puffs_kcn pvnr_cn_src
; /* OUT */
534 struct puffs_kcred pvnr_cn_src_cred
; /* OUT */
535 struct puffs_kcn pvnr_cn_targ
; /* OUT */
536 struct puffs_kcred pvnr_cn_targ_cred
; /* OUT */
538 puffs_cookie_t pvnr_cookie_src
; /* OUT */
539 puffs_cookie_t pvnr_cookie_targ
; /* OUT */
540 puffs_cookie_t pvnr_cookie_targdir
; /* OUT */
543 struct puffs_vnmsg_symlink
{
544 struct puffs_req pvn_pr
;
546 struct puffs_kcn pvnr_cn
; /* OUT */
547 struct puffs_kcred pvnr_cn_cred
; /* OUT */
549 struct vattr pvnr_va
; /* OUT */
550 puffs_cookie_t pvnr_newnode
; /* IN */
551 char pvnr_link
[MAXPATHLEN
]; /* OUT */
552 /* Used only if PUFFS_KFLAG_CACHE_USE_TTL */
553 struct timespec pvnr_va_ttl
; /* IN */
554 struct timespec pvnr_cn_ttl
; /* IN */
557 struct puffs_vnmsg_readdir
{
558 struct puffs_req pvn_pr
;
560 struct puffs_kcred pvnr_cred
; /* OUT */
561 off_t pvnr_offset
; /* IN/OUT */
562 size_t pvnr_resid
; /* IN/OUT */
563 size_t pvnr_ncookies
; /* IN/OUT */
564 int pvnr_eofflag
; /* IN */
566 size_t pvnr_dentoff
; /* OUT */
567 uint8_t pvnr_data
[0] /* IN */
568 __aligned(ALIGNBYTES
+1);
571 struct puffs_vnmsg_readlink
{
572 struct puffs_req pvn_pr
;
574 struct puffs_kcred pvnr_cred
; /* OUT */
575 size_t pvnr_linklen
; /* IN */
576 char pvnr_link
[MAXPATHLEN
]; /* IN */
579 struct puffs_vnmsg_reclaim
{
580 struct puffs_req pvn_pr
;
582 int pvnr_nlookup
; /* OUT */
585 struct puffs_vnmsg_inactive
{
586 struct puffs_req pvn_pr
;
589 struct puffs_vnmsg_print
{
590 struct puffs_req pvn_pr
;
595 struct puffs_vnmsg_pathconf
{
596 struct puffs_req pvn_pr
;
598 int pvnr_name
; /* OUT */
599 register_t pvnr_retval
; /* IN */
602 struct puffs_vnmsg_advlock
{
603 struct puffs_req pvn_pr
;
605 struct flock pvnr_fl
; /* OUT */
606 void *pvnr_id
; /* OUT */
607 int pvnr_op
; /* OUT */
608 int pvnr_flags
; /* OUT */
611 struct puffs_vnmsg_mmap
{
612 struct puffs_req pvn_pr
;
614 vm_prot_t pvnr_prot
; /* OUT */
615 struct puffs_kcred pvnr_cred
; /* OUT */
618 struct puffs_vnmsg_abortop
{
619 struct puffs_req pvn_pr
;
621 struct puffs_kcn pvnr_cn
; /* OUT */
622 struct puffs_kcred pvnr_cn_cred
; /* OUT */
625 struct puffs_vnmsg_getextattr
{
626 struct puffs_req pvn_pr
;
628 int pvnr_attrnamespace
; /* OUT */
629 char pvnr_attrname
[PUFFS_EXTNAMELEN
];/* OUT */
631 struct puffs_kcred pvnr_cred
; /* OUT */
632 size_t pvnr_datasize
; /* IN */
634 size_t pvnr_resid
; /* IN/OUT */
635 uint8_t pvnr_data
[0] /* IN */
636 __aligned(ALIGNBYTES
+1);
639 struct puffs_vnmsg_setextattr
{
640 struct puffs_req pvn_pr
;
642 int pvnr_attrnamespace
; /* OUT */
643 char pvnr_attrname
[PUFFS_EXTNAMELEN
];/* OUT */
645 struct puffs_kcred pvnr_cred
; /* OUT */
647 size_t pvnr_resid
; /* IN/OUT */
648 uint8_t pvnr_data
[0] /* OUT */
649 __aligned(ALIGNBYTES
+1);
652 struct puffs_vnmsg_listextattr
{
653 struct puffs_req pvn_pr
;
655 int pvnr_attrnamespace
; /* OUT */
657 struct puffs_kcred pvnr_cred
; /* OUT */
658 size_t pvnr_datasize
; /* IN */
660 size_t pvnr_resid
; /* IN/OUT */
661 int pvnr_flag
; /* OUT */
662 uint8_t pvnr_data
[0] /* IN */
663 __aligned(ALIGNBYTES
+1);
666 struct puffs_vnmsg_deleteextattr
{
667 struct puffs_req pvn_pr
;
669 int pvnr_attrnamespace
; /* OUT */
670 char pvnr_attrname
[PUFFS_EXTNAMELEN
];/* OUT */
672 struct puffs_kcred pvnr_cred
; /* OUT */
675 #define PUFFS_HAVE_FALLOCATE 1
676 struct puffs_vnmsg_fallocate
{
677 struct puffs_req pvn_pr
;
678 off_t pvnr_off
; /* OUT */
679 off_t pvnr_len
; /* OUT */
682 struct puffs_vnmsg_fdiscard
{
683 struct puffs_req pvn_pr
;
684 off_t pvnr_off
; /* OUT */
685 off_t pvnr_len
; /* OUT */
689 * For cache reports. Everything is always out-out-out, no replies
692 struct puffs_cacherun
{
693 off_t pcache_runstart
;
697 /* cache info. old used for write now */
698 struct puffs_cacheinfo
{
699 struct puffs_req pcache_pr
;
703 struct puffs_cacherun pcache_runs
[0];
705 #define PCACHE_TYPE_READ 0
706 #define PCACHE_TYPE_WRITE 1
709 * Error notification. Always outgoing, no response, no remorse.
712 struct puffs_req perr_pr
;
718 #endif /* _FS_PUFFS_PUFFS_MSGIF_H_ */