diff options
Diffstat (limited to 'include/sys/zfs_znode.h')
-rw-r--r-- | include/sys/zfs_znode.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h index aa9d9d288..b5ab7dbae 100644 --- a/include/sys/zfs_znode.h +++ b/include/sys/zfs_znode.h @@ -139,8 +139,9 @@ extern "C" { #define ZFS_MAX_BLOCKSIZE (SPA_MAXBLOCKSIZE) -/* Path component length */ /* + * Path component length + * * The generic fs code uses MAXNAMELEN to represent * what the largest component length is. Unfortunately, * this length includes the terminating NULL. ZFS needs @@ -248,11 +249,7 @@ typedef struct znode { #define S_ISDEV(mode) (S_ISCHR(mode) || S_ISBLK(mode) || S_ISFIFO(mode)) -/* - * ZFS_ENTER() is called on entry to each ZFS inode and vfs operation. - * ZFS_EXIT() must be called before exitting the vop. - * ZFS_VERIFY_ZP() verifies the znode is valid. - */ +/* Called on entry to each ZFS vnode and vfs operation */ #define ZFS_ENTER(zsb) \ { \ rrw_enter_read(&(zsb)->z_teardown_lock, FTAG); \ @@ -262,12 +259,14 @@ typedef struct znode { } \ } +/* Must be called before exiting the vop */ #define ZFS_EXIT(zsb) \ { \ rrw_exit(&(zsb)->z_teardown_lock, FTAG); \ tsd_exit(); \ } +/* Verifies the znode is valid */ #define ZFS_VERIFY_ZP(zp) \ if ((zp)->z_sa_hdl == NULL) { \ ZFS_EXIT(ZTOZSB(zp)); \ @@ -289,15 +288,14 @@ typedef struct znode { #define ZFS_OBJ_HOLD_OWNED(zsb, obj_num) \ mutex_owned(ZFS_OBJ_MUTEX((zsb), (obj_num))) -/* - * Macros to encode/decode ZFS stored time values from/to struct timespec - */ +/* Encode ZFS stored time values from a struct timespec */ #define ZFS_TIME_ENCODE(tp, stmp) \ { \ (stmp)[0] = (uint64_t)(tp)->tv_sec; \ (stmp)[1] = (uint64_t)(tp)->tv_nsec; \ } +/* Decode ZFS stored time values to a struct timespec */ #define ZFS_TIME_DECODE(tp, stmp) \ { \ (tp)->tv_sec = (time_t)(stmp)[0]; \ |