1 .\" $NetBSD: puffs_ops.3,v 1.36 2012/08/16 11:28:38 wiz Exp $
3 .\" Copyright (c) 2007 Antti Kantee. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .Nd puffs callback operations
38 .Fa "struct puffs_usermount *pu" "struct statvfs *sbp"
42 .Fa "struct puffs_usermount *pu" "int waitfor" "const struct puffs_cred *pcr"
46 .Fa "struct puffs_usermount *pu" "void *fid" "size_t fidsize"
47 .Fa "struct puffs_newinfo *pni"
51 .Fa "struct puffs_usermount *pu" "puffs_cookie_t cookie" "void *fid"
55 .Fo puffs_fs_extattrctl
56 .Fa "struct puffs_usermount *pu" "int cmd" "puffs_cookie_t cookie" "int flags"
57 .Fa "int attrnamespace" "const char *attrname"
61 .Fa "struct puffs_usermount *pu" "int flags"
65 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
66 .Fa "struct puffs_newinfo *pni" "const struct puffs_cn *pcn"
70 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
71 .Fa "struct puffs_newinfo *pni" "const struct puffs_cn *pcn"
72 .Fa "const struct vattr *vap"
76 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
77 .Fa "struct puffs_newinfo *pni" "const struct puffs_cn *pcn"
78 .Fa "const struct vattr *vap"
82 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int mode"
83 .Fa "const struct puffs_cred *pcr"
87 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int flags"
88 .Fa "const struct puffs_cred *pcr"
92 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int mode"
93 .Fa "const struct puffs_cred *pcr"
96 .Fo puffs_node_getattr
97 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "struct vattr *vap"
98 .Fa "const struct puffs_cred *pcr"
101 .Fo puffs_node_setattr
102 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "const struct vattr *vap"
103 .Fa "const struct puffs_cred *pcr"
106 .Fo puffs_node_getattr_ttl
107 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "struct vattr *vap"
108 .Fa "const struct puffs_cred *pcr" "struct timespec *va_ttl"
111 .Fo puffs_node_setattr_ttl
112 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "const struct vattr *vap"
113 .Fa "const struct puffs_cred *pcr" "struct timespec *va_ttl" "int xflag"
117 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int *events"
121 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int flags"
122 .Fa "const struct puffs_cred *pcr"
126 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
127 .Fa "const struct puffs_cred *pcr" "int flags" "off_t offlo" "off_t offhi"
131 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "off_t oldoff"
132 .Fa "off_t newoff" "const struct puffs_cred *pcr"
135 .Fo puffs_node_remove
136 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "puffs_cookie_t targ"
137 .Fa "const struct puffs_cn *pcn"
141 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "puffs_cookie_t targ"
142 .Fa "const struct puffs_cn *pcn"
145 .Fo puffs_node_rename
146 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "puffs_cookie_t src"
147 .Fa "const struct puffs_cn *pcn_src" "puffs_cookie_t targ_dir"
148 .Fa "puffs_cookie_t targ" "const struct puffs_cn *pcn_targ"
152 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
153 .Fa "struct puffs_newinfo *pni" "const struct puffs_cn *pcn"
154 .Fa "const struct vattr *vap"
158 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "puffs_cookie_t targ"
159 .Fa "const struct puffs_cn *pcn"
162 .Fo puffs_node_readdir
163 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "struct dirent *dent"
164 .Fa "off_t *readoff" "size_t *reslen" "const struct puffs_cred *pcr"
165 .Fa "int *eofflag" "off_t *cookies" "size_t *ncookies"
168 .Fo puffs_node_symlink
169 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
170 .Fa "struct puffs_newinfo *pni"
171 .Fa "const struct puffs_cn *pcn_src" "const struct vattr *vap"
172 .Fa "const char *link_target"
175 .Fo puffs_node_readlink
176 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
177 .Fa "const struct puffs_cred *pcr" "char *link" "size_t *linklen"
181 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "uint8_t *buf"
182 .Fa "off_t offset" "size_t *resid" "const struct puffs_cred *pcr" "int ioflag"
186 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "uint8_t *buf"
187 .Fa "off_t offset" "size_t *resid" "const struct puffs_cred *pcr" "int ioflag"
190 .Fo puffs_node_write2
191 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "uint8_t *buf"
192 .Fa "off_t offset" "size_t *resid" "const struct puffs_cred *pcr" "int ioflag"
196 .Fo puffs_node_abortop
197 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
198 .Fa "const struct puffs_cn *pcn"
201 .Fo puffs_node_getextattr
202 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int attrnamespace"
203 .Fa "const char *attrname" "size_t *attrsize" "uint8_t *attr" "size_t *resid"
204 .Fa "const struct puffs_cred *pcr"
207 .Fo puffs_node_setextattr
208 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int attrnamespace"
209 .Fa "const char *attrname" "uint8_t *attr" "size_t *resid"
210 .Fa "const struct puffs_cred *pcr"
213 .Fo puffs_node_listextattr
214 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int attrnamespace"
215 .Fa "size_t *attrssize" "uint8_t *attrs" "iint flag" "size_t *resid"
216 .Fa "const struct puffs_cred *pcr"
219 .Fo puffs_node_deleteextattr
220 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int attrnamespace"
221 .Fa "const char *attrname"
222 .Fa "const struct puffs_cred *pcr"
225 .Fn puffs_node_print "struct puffs_usermount *pu" "puffs_cookie_t opc"
227 .Fo puffs_node_reclaim
228 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
231 .Fo puffs_node_reclaim2
232 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int nlookup"
235 .Fo puffs_node_inactive
236 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
239 .Fn puffs_setback "struct puffs_cc *pcc" "int op"
241 .Fn puffs_newinfo_setcookie "struct puffs_newinfo *pni" "puffs_cookie_t cookie"
243 .Fn puffs_newinfo_setvtype "struct puffs_newinfo *pni" "enum vtype vtype"
245 .Fn puffs_newinfo_setsize "struct puffs_newinfo *pni" "voff_t size"
247 .Fn puffs_newinfo_setrdev "struct puffs_newinfo *pni" "dev_t rdev"
249 .Fn puffs_newinfo_setva "struct puffs_newinfo *pni" "struct vattr *vap"
251 .Fn puffs_newinfo_setvattl "struct puffs_newinfo *pni" "struct timespec *va_ttl"
253 .Fn puffs_newinfo_setcnttl "struct puffs_newinfo *pni" "struct timespec *cn_ttl"
257 requires to function can be divided into two categories: file system
258 callbacks and node callbacks.
259 The former affect the entire file system while the latter are targeted
260 at a file or a directory and a file.
261 They are roughly equivalent to the vfs and vnode operations in the
264 All callbacks can be prototyped with the file system name and operation
266 .Fn PUFFSOP_PROTOS fsname .
267 .Ss File system callbacks (puffs_fs)
269 .It Fn puffs_fs_statvfs "pu" "sbp"
270 The following fields of the argument
274 * unsigned long f_bsize; file system block size
275 * unsigned long f_frsize; fundamental file system block size
276 * fsblkcnt_t f_blocks; number of blocks in file system,
277 * (in units of f_frsize)
279 * fsblkcnt_t f_bfree; free blocks avail in file system
280 * fsblkcnt_t f_bavail; free blocks avail to non-root
281 * fsblkcnt_t f_bresvd; blocks reserved for root
283 * fsfilcnt_t f_files; total file nodes in file system
284 * fsfilcnt_t f_ffree; free file nodes in file system
285 * fsfilcnt_t f_favail; free file nodes avail to non-root
286 * fsfilcnt_t f_fresvd; file nodes reserved for root
289 .It Fn puffs_fs_sync "pu" "waitfor" "pcr"
290 All the dirty buffers that have been cached at the file server
291 level including metadata should be committed to stable storage.
294 parameter affects the operation.
296 .Bl -tag -width XMNT_NOWAITX
298 Wait for all I/O for complete until returning.
300 Initiate I/O, but do not wait for completion.
302 Synchorize data not synchoronized by the file system syncer,
303 i.e., data not written when
309 The credentials for the initiator of the sync operation are present in
311 and will usually be either file system or kernel credentials, but might
312 also be user credentials.
313 However, most of the time it is advisable to sync regardless of the
314 credentials of the caller.
315 .It Fn puffs_fs_fhtonode "pu" "fid" "fidsize" "pni"
316 Translates a file handle
321 indicates how large the file handle is.
322 In case the file system's handles are static length, this parameter can
323 be ignored as the kernel guarantees all file handles passed to the file
324 server are of correct length.
325 For dynamic length handles the field should be examined and
327 returned in case the file handle length is not correct.
329 This function provides essentially the same information to the kernel as
330 .Fn puffs_node_lookup .
331 The information is necessary for creating a new vnode corresponding to
333 .It Fn puffs_fs_nodetofh "pu" "cookie" "fid" "fidsize"
334 Create a file handle from the node described by
336 The file handle should contain enough information to reliably identify
337 the node even after reboots and the pathname/inode being replaced by
339 If this is not possible, it is up to the author of the file system to
340 act responsibly and decide if the file system can support file handles
343 For file systems which want dynamic length file handles, this function
344 must check if the file handle space indicated by
346 is large enough to accommodate the file handle for the node.
347 If not, it must fill in the correct size and return
349 In either case, the handle length should be supplied to the kernel in
351 File systems with static length handles can ignore the size parameter as
352 the kernel always supplies the correct size buffer.
353 .It Fn puffs_fs_unmount "pu" "flags"
354 Unmount the file system.
355 The kernel has assumedly flushed all cached data when this callback
357 If the file system cannot currently be safely be unmounted, for whatever
358 reason, the kernel will honor an error value and not forcibly unmount.
361 is not honored by the file server, the kernel will forcibly unmount
365 These operations operate in the level of individual files.
366 The file cookie is always provided as the second argument
368 If the operation is for a file, it will be the cookie of the file.
369 The case the operation involves a directory (such as
370 .Dq create file in directory ) ,
371 the cookie will be for the directory.
372 Some operations take additional cookies to describe the rest of
374 The return value 0 signals success, else an appropriate errno value
376 Please note that neither this list nor the descriptions are complete.
378 .It Fn puffs_node_lookup "pu" "opc" "pni" "pcn"
379 This function is used to locate nodes, or in other words translate
380 pathname components to file system data structures.
381 The implementation should match the name in
383 against the existing entries in the directory provided by the cookie
385 If found, the cookie for the located node should be set in
388 .Fn puffs_newinfo_setcookie .
389 Additionally, the vnode type and size (latter applicable to regular files only)
391 .Fn puffs_newinfo_setvtype
393 .Fn puffs_newinfo_setsize ,
395 If the located entry is a block device or character device file,
396 the dev_t for the entry should be set using
397 .Fn puffs_newinfo_setrdev .
402 .Dv PUFFS_KFLAG_CACHE_FS_TTL
404 .Fn puffs_newinfo_setva ,
405 .Fn puffs_newinfo_setvattl ,
407 .Fn puffs_newinfo_setcnttl
408 can be called to specify the new node attributes, cached attributes
409 time to live, and cached name time to live.
411 The type of operation is found from
412 .Va pcn-\*[Gt]pcn_nameiop :
413 .Bl -tag -width XNAMEI_LOOKUPX
415 Normal lookup operation.
417 Lookup to create a node.
419 Lookup for node deletion.
421 Lookup for the target of a rename operation (source will be looked
426 The final component from a pathname lookup usually requires special
428 It can be identified by looking at the
429 .Va pcn-\*[Gt]pcn_flags
431 .Dv PUFFSLOOKUP_ISLASTCN .
432 For example, in most cases the lookup operation will want to check if
433 a delete, rename or create operation has enough credentials to perform
436 The return value 0 signals a found node and a nonzero value signals
440 signals "success" for cases where the lookup operation is
444 Failure in these cases can be signalled by returning another appropriate
445 error code, for example
448 Usually a null-terminated string for the next pathname component is
450 .Ar pcn-\*[Gt]pcn_name .
451 In case the file system is using the option
452 .Dv PUFFS_KFLAG_LOOKUP_FULLPNBUF ,
453 the remainder of the complete pathname under lookup is found in
455 .Ar pcn-\*[Gt]pcn_namelen
456 always specifies the length of the next component.
457 If operating with a full path, the file system is allowed to consume
458 more than the next component's length in node lookup.
459 This is done by setting
460 .Ar pcn-\*[Gt]pcn_consume
461 to indicate the amount of
463 characters in addition to
464 .Ar pcn-\*[Gt]pcn_namelen
466 .It Fn puffs_node_create "pu" "opc" "pni" "pcn" "va"
467 .It Fn puffs_node_mkdir "pu" "opc" "pni" "pcn" "va"
468 .It Fn puffs_node_mknod "pu" "opc" "pni" "pcn" "va"
469 A file node is created in the directory denoted by the cookie
471 by any of the above callbacks.
472 The name of the new file can be found from
474 and the attributes are specified by
476 and the cookie for the newly created node should be set in
478 The only difference between these three is that they create a regular
479 file, directory and device special file, respectively.
481 In case of mknod, the device identifier can be found in
482 .Fa va-\*[Gt]va_rdev .
483 .It Fn puffs_node_open "pu" "opc" "mode" "pcr"
484 Open the node denoted by the cookie
488 specifies the flags that
490 was called with, e.g.
494 .It Fn puffs_node_close "pu" "opc" "flags" "pcr"
498 parameter describes the flags that the file was opened with.
499 .It Fn puffs_node_access "pu" "opc" "mode" "pcr"
500 Check if the credentials of
502 have the right to perform the operation specified by
508 can specify read, write or execute by
514 .It Fn puffs_node_getattr "pu" "opc" "va" "pcr"
515 The attributes of the node specified by
517 must be copied to the space pointed by
519 .It Fn puffs_node_getattr_ttl "pu" "opc" "va" "pcr" "va_ttl"
521 .Fn puffs_node_getattr
522 with cached attribute time to live specified in
524 .It Fn puffs_node_setattr "pu" "opc" "va" "pcr"
525 The attributes for the node specified by
527 must be set to those contained in
531 which contain a value different from
533 (typecast to the field's type!) contain a valid value.
534 .It Fn puffs_node_setattr_ttl "pu" "opc" "va" "pcr" "va_ttl" "xflag"
536 .Fn puffs_node_setattr
537 with cached attribute time to live specified in
539 .Dv PUFFS_SETATTR_FAF
542 for Fire-And-Forget operations.
543 .It Fn puffs_node_poll "pu" "opc" "events"
544 Poll for events on node
550 are available, the function should set the bitmask to match available
551 events and return immediately.
552 Otherwise, the function should block (yield) until some events in
554 become available and only then set the
558 In case this function returns an error,
562 equivalent) will be delivered to the calling process.
565 The system call interface for
567 contains a timeout parameter.
568 At this level, however, the timeout is not supplied.
569 In case input does not arrive, the file system should periodically
570 unblock and return 0 new events to avoid hanging forever.
571 This will hopefully be better supported by libpuffs in the future.
572 .It Fn puffs_node_mmap "pu" "opc" "flags" "pcr"
573 Called when a regular file is being memory mapped by
576 is currently always 0.
577 .It Fn puffs_node_fsync "pu" "opc" "pcr" "flags" "offlo" "offhi"
578 Sychronize a node's contents onto stable storage.
579 This is necessary only if the file server caches some information
580 before committing it.
583 specifies the minimum level of sychronization required (XXX: they are
589 specify the data offsets requiring to be synced.
590 A high offset of 0 means sync from
592 to the end of the file.
593 .It Fn puffs_node_seek "pu" "opc" "oldoff" "newoff" "pcr"
596 is seekable to the location
600 specifies the offset we are starting the seek from.
601 Most file systems dealing only with regular will choose to not
603 However, it is useful for example in cases where files are
605 .It Fn puffs_node_remove "pu" "opc" "targ" "pcn"
606 .It Fn puffs_node_rmdir "pu" "opc" "targ" "pcn"
609 from the directory indicated by
611 The directory entry name to be removed is provided by
613 The rmdir operation removes only directories, while the remove
614 operation removes all other types except directories.
616 It is paramount to note that the file system may not remove the
617 node data structures at this point, only the directory entry and prevent
618 lookups from finding the node again.
619 This is to retain the
622 The data may be removed only when
623 .Fn puffs_node_reclaim
625 .Fn puffs_node_reclaim2
626 is called for the node, as this assures there are no further users.
627 .It Fn puffs_node_link "pu" "opc" "targ" "pcn"
628 Create a hard link for the node
634 provides the directory entry name for the new link.
635 .It Fn puffs_node_rename "pu" "src_dir" "src" "pcn_src" "targ_dir" "targ" "pcn_targ"
638 with the name specified by
642 The target directory and target name are given by
648 the target node already exists, it is specified by
650 and must be replaced atomically.
656 It is legal to replace a directory node by another directory node with
657 the means of rename if the target directory is empty, otherwise
660 All other types can replace all other types.
661 In case a rename between incompatible types is attempted, the errors
665 should be returned, depending on the target type.
666 .It Fn puffs_node_readdir "pu" "opc" "dent" "readoff" "reslen" "pcr" "eofflag" "cookies" "ncookies"
667 To read directory entries,
668 .Fn puffs_node_readdir
670 It should store directories as
672 in the space pointed to by
674 The amount of space available is given by
676 and before returning it should be set to the amount of space
681 is used to specify the offset to the directory.
682 Its intepretation is up to the file system and it should be set to
683 signal the continuation point when there is no more room for the next
686 It is most performant to return the maximal amount of directory
688 It is easiest to generate directory entries by using
690 which also automatically advances the necessary pointers.
692 In case end-of-directory is reached,
694 should be set to one.
695 Note that even a new call to readdir may start where
697 points to end-of-directory.
699 If the file system supports file handles, the arguments
705 is a vector for offsets corresponding to read offsets.
706 One cookie should be filled out for each directory entry.
707 The value of the cookie should equal the offset of the
709 directory entry, i.e., which offset should be passed to readdir for
710 the first entry read to be the entry following the current one.
712 is the number of slots for cookies in the cookie vector upon entry to
713 the function and must be set to the amount of cookies stored in the
714 vector (i.e., amount of directory entries read) upon exit.
715 There is always enough space in the cookie vector for the maximal number
716 of entries that will fit into the directory entry buffer.
717 For filling out the vector, the helper function
718 .Fn PUFFS_STORE_DCOOKIE cookies ncookies offset
720 This properly checks against
726 must be initialized to zero before the first call to
727 .Fn PUFFS_STORE_DCOOKIE .
728 .It Fn puffs_node_symlink "pu" "opc" "pni" "pcn_src" "va" "link_target"
729 Create a symbolic link into the directory
733 and the initial attributes in
737 contains a null-terminated string for the link target.
738 The created node cookie should be set in
740 .It Fn puffs_node_readlink "pu" "opc" "pcr" "link" "linklen"
741 Read the target of a symbolic link
743 The result is placed in the buffer pointed to by
745 This buffer's length is given in
747 and it must be updated to reflect the real link length.
748 A terminating nul character should not be put into the buffer and
750 be included in the link length.
751 .It Fn puffs_node_read "pu" "opc" "buf" "offset" "resid" "pcr" "ioflag"
752 Read the contents of a file
754 It will gather the data from
756 in the file and read the number
759 The buffer is guaranteed to have this much space.
760 The amount of data requested by
762 should be read, except in the case of eof-of-file or an error.
765 should be set to indicate the amount of request NOT completed.
766 In the normal case this should be 0.
767 .It Fn puffs_node_write "pu" "opc" "buf" "offset" "resid" "pcr" "ioflag"
768 .It Fn puffs_node_write2 "pu" "opc" "buf" "offset" "resid" "pcr" "ioflag" \
771 writes data to a file
775 and extend the file if necessary.
776 The number of octets written is indicated by
778 everything must be written or an error will be generated.
779 The parameter must be set to indicate the amount of data NOT written.
782 is specified, the data should be appended to the end of the file.
783 .Fn puffs_node_write2
784 serves the same purpose as
790 is set for Fire-And-Forget operations.
791 .It Fn puffs_node_print "pu" "opc"
792 Print information about node.
793 This is used only for kernel-initiated diagnostic purposes.
794 .It Fn puffs_node_reclaim "pu" "opc"
795 The kernel will no longer reference the cookie and resources associated
796 with it may be freed.
799 has a link count of zero, it may be safely removed now.
800 .It Fn puffs_node_reclaim2 "pu" "opc" "nlookup"
802 .Fn puffs_node_reclaim
803 with an addditional argument for the number of lookups that have been done
804 on the node (Node creation is counted as a lookup). This can be used by the
805 filesystem to avoid a race condition, where the kernel sends a reclaim
806 while it does not have received the reply for a lookup.
807 If the filesystem tracks lookup count, and compares to
809 it can detect this situation and ignore the reclaim.
811 If the filesystem maps cookies to
812 .Vt struct puffs_node
813 then the framework will do that work, and
814 .Fn puffs_node_reclaim
815 can be reliabily used without the race condition.
816 .It Fn puffs_node_abortop "pu" "opc" "pcn"
817 In case the operation following lookup (e.g., mkdir or remove) is not
818 executed for some reason, abortop will be issued.
819 This is useful only for servers which cache state between lookup
820 and a directory operation and is generally left unimplemented.
821 .It Fn puffs_node_inactive "pu" "opc"
824 has lost its last reference in the kernel.
825 However, the cookie must still remain valid until
826 .Fn puffs_node_reclaim
828 .Fn puffs_node_reclaim2
830 .It Fn puffs_setback "pcc" "op"
831 Issue a "setback" operation which will be handled when the request response
832 is returned to the kernel.
833 Currently this can be only called from mmap, open, remove and rmdir.
834 The valid parameters for
837 .Dv PUFFS_SETBACK_INACT_N1
839 .Dv PUFFS_SETBACK_INACT_N2 .
840 These signal that a file system mounted with
841 .Dv PUFFS_KFLAG_IAONDEMAND
842 should call the file system inactive method for the specified node.
843 The node number 1 always means the operation cookie
845 while the node number 2 can be used to specify the second node argument
846 present in some methods, e.g., remove.
847 .It Fn puffs_newinfo_setcookie pni cookie
848 Set cookie for node provided by this method to
850 .It Fn puffs_newinfo_setvtype pni vtype
851 Set the type of the newly located node to
853 This call is valid only for
857 .It Fn puffs_newinfo_setsize pni size
858 Set the size of the newly located node to
860 If left unset, the value defaults to 0.
861 This call is valid only for
865 .It Fn puffs_newinfo_setrdev pni rdev
866 Set the type of the newly located node to
868 This call is valid only for
872 producing device type nodes.
873 .It Fn puffs_newinfo_setva pni vap
874 Set the attributes for newly created vnode.
875 This call is valid for
885 .Dv PUFFS_KFLAG_CACHE_FS_TTL
887 .It Fn puffs_newinfo_setvattl pni va_ttl
888 Set cached attribute time to live for newly created vnode.
889 This call is valid for
899 .Dv PUFFS_KFLAG_CACHE_FS_TTL
901 .It Fn puffs_newinfo_setcnttl pni cn_ttl
902 Set cached name time to live for newly created vnode.
903 This call is valid for
913 .Dv PUFFS_KFLAG_CACHE_FS_TTL