- @function VNOP_SEARCHFS
- @abstract Search a filesystem quickly for files or directories that match the passed-in search criteria.
- @discussion VNOP_SEARCHFS is a getattrlist-based system call which is implemented almost entirely inside
- supported filesystems. Callers provide a set of criteria to match against, and the filesystem is responsible
- for finding all files or directories that match the criteria. Once these files or directories are found,
- the user-requested attributes of these files is provided as output. The set of searchable attributes is a
- subset of the getattrlist attributes. For example, ATTR_CMN_UUID is not a valid searchable attribute as of
- 10.6. A common usage scenario could be to request all files whose mod dates is greater than time X, less than
- time Y, and provide the inode ID and filename of the matching objects as output.
- @param vp The vnode representing the mountpoint of the filesystem to be searched.
- @param a_searchparams1 If one-argument search criteria is requested, the search criteria would go here. However,
- some search criteria, like ATTR_CMN_MODTIME, can be bounded. The user could request files modified between time X
- and time Y. In this case, the lower bound goes in a_searchparams1.
- @param a_searchparams2 If two-argument search criteria is requested, the upper bound goes in here.
- @param a_searchattrs Contains the getattrlist-style attribute bits which are requested by the current search.
- @param a_maxmatches The maximum number of matches to return in a single system call.
- @param a_timelimit The suggested maximum amount of time we can spend in the kernel to service this system call.
- Filesystems should use this as a guide only, and set their own internal maximum time to avoid denial of service.
- @param a_returnattrs The getattrlist-style attributes to return for items in the filesystem that match the search
- criteria above.
- @param a_scriptcode Currently ignored.
- @param a_uio The uio in which to write out the search matches.
- @param a_searchstate Sometimes searches cannot be completed in a single system call. In this case, we provide
- an identifier back to the user which indicates where to resume a previously-started search. This is an opaque structure
- used by the filesystem to identify where to resume said search.
- @param a_context The context in which to perform the filesystem search.
- @return 0 on success, EAGAIN for searches which could not be completed in 1 call, and other ERRNOS as needed.
+ * @function VNOP_SEARCHFS
+ * @abstract Search a filesystem quickly for files or directories that match the passed-in search criteria.
+ * @discussion VNOP_SEARCHFS is a getattrlist-based system call which is implemented almost entirely inside
+ * supported filesystems. Callers provide a set of criteria to match against, and the filesystem is responsible
+ * for finding all files or directories that match the criteria. Once these files or directories are found,
+ * the user-requested attributes of these files is provided as output. The set of searchable attributes is a
+ * subset of the getattrlist attributes. For example, ATTR_CMN_UUID is not a valid searchable attribute as of
+ * 10.6. A common usage scenario could be to request all files whose mod dates is greater than time X, less than
+ * time Y, and provide the inode ID and filename of the matching objects as output.
+ * @param vp The vnode representing the mountpoint of the filesystem to be searched.
+ * @param a_searchparams1 If one-argument search criteria is requested, the search criteria would go here. However,
+ * some search criteria, like ATTR_CMN_MODTIME, can be bounded. The user could request files modified between time X
+ * and time Y. In this case, the lower bound goes in a_searchparams1.
+ * @param a_searchparams2 If two-argument search criteria is requested, the upper bound goes in here.
+ * @param a_searchattrs Contains the getattrlist-style attribute bits which are requested by the current search.
+ * @param a_maxmatches The maximum number of matches to return in a single system call.
+ * @param a_timelimit The suggested maximum amount of time we can spend in the kernel to service this system call.
+ * Filesystems should use this as a guide only, and set their own internal maximum time to avoid denial of service.
+ * @param a_returnattrs The getattrlist-style attributes to return for items in the filesystem that match the search
+ * criteria above.
+ * @param a_scriptcode Currently ignored.
+ * @param a_uio The uio in which to write out the search matches.
+ * @param a_searchstate Sometimes searches cannot be completed in a single system call. In this case, we provide
+ * an identifier back to the user which indicates where to resume a previously-started search. This is an opaque structure
+ * used by the filesystem to identify where to resume said search.
+ * @param a_context The context in which to perform the filesystem search.
+ * @return 0 on success, EAGAIN for searches which could not be completed in 1 call, and other ERRNOS as needed.