diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-27 09:06:38 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-27 09:06:38 -0400 |
commit | 9a6f11ed8f421fb1cc7b37390e32316ff4701f5d (patch) | |
tree | eb4709b48ddc223669e226b34db2e1a22f9aac86 /fs/btrfs/ctree.h | |
parent | 6407bf6d7c449cbfb0a39d985194e265eda3baf4 (diff) | |
download | lwn-9a6f11ed8f421fb1cc7b37390e32316ff4701f5d.tar.gz lwn-9a6f11ed8f421fb1cc7b37390e32316ff4701f5d.zip |
Btrfs: split out level field in struct header
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 1a98952e0faf..a4ad39b58a4b 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -59,7 +59,7 @@ struct btrfs_header { __le32 ham; __le16 nritems; __le16 flags; - /* generation flags to be added */ + u8 level; } __attribute__ ((__packed__)); #define BTRFS_MAX_LEVEL 8 @@ -648,15 +648,13 @@ static inline void btrfs_set_header_flags(struct btrfs_header *h, u16 val) static inline int btrfs_header_level(struct btrfs_header *h) { - return btrfs_header_flags(h) & (BTRFS_MAX_LEVEL - 1); + return h->level; } static inline void btrfs_set_header_level(struct btrfs_header *h, int level) { - u16 flags; BUG_ON(level > BTRFS_MAX_LEVEL); - flags = btrfs_header_flags(h) & ~(BTRFS_MAX_LEVEL - 1); - btrfs_set_header_flags(h, flags | level); + h->level = level; } static inline int btrfs_is_leaf(struct btrfs_node *n) |