3742 zfs comments need cleaner, more consistent style
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>

References:
  https://www.illumos.org/issues/3742
  illumos/illumos-gate@f717074149

Ported-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
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.
This commit is contained in:
Will Andrews
2013-06-11 09:12:34 -08:00
committed by Brian Behlendorf
parent e49f1e20a0
commit d3cc8b152e
37 changed files with 183 additions and 202 deletions
+7 -9
View File
@@ -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]; \