/*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2014 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
extern struct vnodeop_desc vnop_compound_rmdir_desc;
#endif /* KERNEL_PRIVATE */
extern struct vnodeop_desc vnop_create_desc;
-extern struct vnodeop_desc vnop_whiteout_desc;
+extern struct vnodeop_desc vnop_whiteout_desc; // obsolete
extern struct vnodeop_desc vnop_mknod_desc;
extern struct vnodeop_desc vnop_open_desc;
extern struct vnodeop_desc vnop_close_desc;
extern struct vnodeop_desc vnop_symlink_desc;
extern struct vnodeop_desc vnop_readdir_desc;
extern struct vnodeop_desc vnop_readdirattr_desc;
+extern struct vnodeop_desc vnop_getattrlistbulk_desc;
extern struct vnodeop_desc vnop_readlink_desc;
extern struct vnodeop_desc vnop_inactive_desc;
extern struct vnodeop_desc vnop_reclaim_desc;
/*!
@function VNOP_WHITEOUT
- @abstract Call down to a filesystem to create a whiteout.
+ @abstract Obsolete - no longer supported.
@discussion Whiteouts are used to support the union filesystem, whereby one filesystem is mounted "transparently"
on top of another. A whiteout in the upper layer of a union mount is a "deletion" of a file in the lower layer;
lookups will catch the whiteout and fail, setting ISWHITEOUT in the componentname structure, even if an underlying
void *a_reserved;
};
-/* Control flags */
-#define VNOP_COMPOUND_OPEN_DO_CREATE 0x00000001
-
/* Results */
#define COMPOUND_OPEN_STATUS_DID_CREATE 0x00000001
#endif /* KERNEL_PRIVATE */
extern errno_t VNOP_READDIRATTR(vnode_t, struct attrlist *, struct uio *, uint32_t, uint32_t, uint32_t *, int *, uint32_t *, vfs_context_t);
#endif /* XNU_KERNEL_PRIVATE */
+struct vnop_getattrlistbulk_args {
+ struct vnodeop_desc *a_desc;
+ vnode_t a_vp;
+ struct attrlist *a_alist;
+ struct vnode_attr *a_vap;
+ struct uio *a_uio;
+ void *a_private;
+ uint64_t a_options;
+ int32_t *a_eofflag;
+ int32_t *a_actualcount;
+ vfs_context_t a_context;
+};
+
+/*!
+ @function VNOP_GETATTRLISTBULK
+ @abstract Call down to get file attributes for many files in a directory at once.
+ @discussion VNOP_GETATTRLISTBULK() packs a buffer with file attributes, as if the results of many "getattrlist" calls.
+ @param vp Directory in which to enumerate entries' attributes.
+ @param alist Which attributes are wanted for each directory entry.
+ @param uio Destination information for resulting attributes.
+ @param vap initialised vnode_attr structure pointer. This structure also has memory allocated (MAXPATHLEN bytes) and assigned to the va_name field for filesystems to use.
+ @param private reserved for future use.
+ @param options
+ @param eofflag Should be set to 1 if the end of the directory has been reached.
+ @param actualcount Should be set to number of files whose attributes were written into buffer.
+ @param ctx Context to authenticate for getattrlistbulk request.
+ @return 0 for success, else an error code.
+ */
+#ifdef XNU_KERNEL_PRIVATE
+extern errno_t VNOP_GETATTRLISTBULK(vnode_t, struct attrlist *, struct vnode_attr *, uio_t, void *, uint64_t, int32_t *, int32_t *, vfs_context_t);
+#endif /* XNU_KERNEL_PRIVATE */
+
struct vnop_readlink_args {
struct vnodeop_desc *a_desc;
vnode_t a_vp;
struct flock *a_fl;
int a_flags;
vfs_context_t a_context;
+ struct timespec *a_timeout;
};
/*!
@param flags F_FLOCK: use flock() semantics. F_POSIX: use POSIX semantics. F_WAIT: sleep if necessary.
F_PROV: Non-coelesced provisional lock (unused in xnu).
@param ctx Context to authenticate for advisory locking request.
+ @param timeout Timespec for timeout in case of F_SETLKWTIMEOUT.
@return 0 for success, or an error code.
*/
#ifdef XNU_KERNEL_PRIVATE
-extern errno_t VNOP_ADVLOCK(vnode_t, caddr_t, int, struct flock *, int, vfs_context_t);
+extern errno_t VNOP_ADVLOCK(vnode_t, caddr_t, int, struct flock *, int, vfs_context_t, struct timespec *);
#endif /* XNU_KERNEL_PRIVATE */
struct vnop_allocate_args {