Print this page
3742 zfs comments need cleaner, more consistent style
Submitted by:   Will Andrews <willa@spectralogic.com>
Submitted by:   Alan Somers <alans@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>
Reviewed by:    George Wilson <george.wilson@delphix.com>
Reviewed by:    Eric Schrock <eric.schrock@delphix.com>

@@ -99,20 +99,20 @@
  * TAKE NOTE:
  * If zap_leaf_phys_t is modified, zap_leaf_byteswap() must be modified.
  */
 typedef struct zap_leaf_phys {
         struct zap_leaf_header {
+                /* Public to ZAP */
                 uint64_t lh_block_type;         /* ZBT_LEAF */
                 uint64_t lh_pad1;
                 uint64_t lh_prefix;             /* hash prefix of this leaf */
                 uint32_t lh_magic;              /* ZAP_LEAF_MAGIC */
                 uint16_t lh_nfree;              /* number free chunks */
                 uint16_t lh_nentries;           /* number of entries */
                 uint16_t lh_prefix_len;         /* num bits used to id this */
 
-/* above is accessable to zap, below is zap_leaf private */
-
+                /* Private to zap_leaf */
                 uint16_t lh_freelist;           /* chunk head of free list */
                 uint8_t lh_flags;               /* ZLF_* flags */
                 uint8_t lh_pad2[11];
         } l_hdr; /* 2 24-byte chunks */
 

@@ -159,17 +159,17 @@
         zap_leaf_phys_t *l_phys;
 } zap_leaf_t;
 
 
 typedef struct zap_entry_handle {
-        /* below is set by zap_leaf.c and is public to zap.c */
+        /* Set by zap_leaf and public to ZAP */
         uint64_t zeh_num_integers;
         uint64_t zeh_hash;
         uint32_t zeh_cd;
         uint8_t zeh_integer_size;
 
-        /* below is private to zap_leaf.c */
+        /* Private to zap_leaf */
         uint16_t zeh_fakechunk;
         uint16_t *zeh_chunkp;
         zap_leaf_t *zeh_leaf;
 } zap_entry_handle_t;
 

@@ -200,11 +200,11 @@
     uint16_t buflen, char *buf);
 
 /*
  * Replace the value of an existing entry.
  *
- * zap_entry_update may fail if it runs out of space (ENOSPC).
+ * May fail if it runs out of space (ENOSPC).
  */
 extern int zap_entry_update(zap_entry_handle_t *zeh,
     uint8_t integer_size, uint64_t num_integers, const void *buf);
 
 /*

@@ -219,14 +219,11 @@
  */
 extern int zap_entry_create(zap_leaf_t *l, struct zap_name *zn, uint32_t cd,
     uint8_t integer_size, uint64_t num_integers, const void *buf,
     zap_entry_handle_t *zeh);
 
-/*
- * Return true if there are additional entries with the same normalized
- * form.
- */
+/* Determine whether there is another entry with the same normalized form. */
 extern boolean_t zap_entry_normalization_conflict(zap_entry_handle_t *zeh,
     struct zap_name *zn, const char *name, struct zap *zap);
 
 /*
  * Other stuff.