diff options
author | Will Andrews <[email protected]> | 2013-06-11 09:12:34 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-04 10:55:25 -0800 |
commit | d3cc8b152edc608fa4b73d4cb5354356da6b451c (patch) | |
tree | e6ac6881379658bfb63cb9787f6781705b6d2004 /include/sys/zfs_znode.h | |
parent | e49f1e20a09181d03382d64afdc4b7a12a5dfdf1 (diff) |
Illumos #3742
3742 zfs comments need cleaner, more consistent style
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Eric Schrock <[email protected]>
Approved by: Christopher Siden <[email protected]>
References:
https://www.illumos.org/issues/3742
illumos/illumos-gate@f7170741490edba9d1d9c697c177c887172bc741
Ported-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1775
Porting notes:
1. The change to zfs_vfsops.c was dropped because it involves
zfs_mount_label_policy, which does not exist in the Linux port.
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]; \ |