aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorTomohiro Kusumi <[email protected]>2019-08-13 22:58:02 +0900
committerBrian Behlendorf <[email protected]>2019-08-13 07:58:02 -0600
commita43570c5f3ca11957c23b4e073a520963cd9cfb2 (patch)
treea6c561ef4243cee81ad4a821ed8d62228b789630 /include/sys
parentfccbd1d6e2e0a95511ad3e1c743b98bf31a6b6c9 (diff)
Change boolean-like uint8_t fields in znode_t to boolean_t
Given znode_t is an in-core structure, it's more readable to have them as boolean. Also co-locate existing boolean fields with them for space efficiency (expecting 8 booleans to be packed/aligned). Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #9092
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/zfs_znode.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h
index d4a3ea769..ef53684f7 100644
--- a/include/sys/zfs_znode.h
+++ b/include/sys/zfs_znode.h
@@ -192,10 +192,14 @@ typedef struct znode {
krwlock_t z_name_lock; /* "master" lock for dirent locks */
zfs_dirlock_t *z_dirlocks; /* directory entry lock list */
rangelock_t z_rangelock; /* file range locks */
- uint8_t z_unlinked; /* file has been unlinked */
- uint8_t z_atime_dirty; /* atime needs to be synced */
- uint8_t z_zn_prefetch; /* Prefetch znodes? */
- uint8_t z_moved; /* Has this znode been moved? */
+ boolean_t z_unlinked; /* file has been unlinked */
+ boolean_t z_atime_dirty; /* atime needs to be synced */
+ boolean_t z_zn_prefetch; /* Prefetch znodes? */
+ boolean_t z_moved; /* Has this znode been moved? */
+ boolean_t z_is_sa; /* are we native sa? */
+ boolean_t z_is_mapped; /* are we mmap'ed */
+ boolean_t z_is_ctldir; /* are we .zfs entry */
+ boolean_t z_is_stale; /* are we stale due to rollback? */
uint_t z_blksz; /* block size in bytes */
uint_t z_seq; /* modification sequence number */
uint64_t z_mapcnt; /* number of pages mapped to file */
@@ -212,10 +216,6 @@ typedef struct znode {
uint64_t z_projid; /* project ID */
list_node_t z_link_node; /* all znodes in fs link */
sa_handle_t *z_sa_hdl; /* handle to sa data */
- boolean_t z_is_sa; /* are we native sa? */
- boolean_t z_is_mapped; /* are we mmap'ed */
- boolean_t z_is_ctldir; /* are we .zfs entry */
- boolean_t z_is_stale; /* are we stale due to rollback? */
struct inode z_inode; /* generic vfs inode */
} znode_t;