diff options
| author | Kaho Ng <ngkaho1234@gmail.com> | 2016-05-12 22:38:59 +0800 |
|---|---|---|
| committer | Kaho Ng <ngkaho1234@gmail.com> | 2016-05-13 21:20:12 +0800 |
| commit | 61098c719f30316c4bac054170c262d0419849a9 (patch) | |
| tree | f87271c3e6e26606f46b667f8e066f3d34c8ed6f /include/ext4_types.h | |
| parent | 5cdc17dc795e0a21486c97b5a34c8dff4bd60444 (diff) | |
ext4_xattr: Changes to EA metadata handling macros
- Move them from include/ext4_types.h to include/ext4_xattr.h
- Use ext4_inode_get_extra_isize to better handle extra_isize field
of inodes.
Diffstat (limited to 'include/ext4_types.h')
| -rw-r--r-- | include/ext4_types.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/include/ext4_types.h b/include/ext4_types.h index 33137ba..a7170a7 100644 --- a/include/ext4_types.h +++ b/include/ext4_types.h @@ -786,39 +786,6 @@ struct ext4_xattr_entry { #define EXT4_GOOD_OLD_INODE_SIZE 128 -#define EXT4_XATTR_PAD_BITS 2 -#define EXT4_XATTR_PAD (1<<EXT4_XATTR_PAD_BITS) -#define EXT4_XATTR_ROUND (EXT4_XATTR_PAD-1) -#define EXT4_XATTR_LEN(name_len) \ - (((name_len) + EXT4_XATTR_ROUND + \ - sizeof(struct ext4_xattr_entry)) & ~EXT4_XATTR_ROUND) -#define EXT4_XATTR_NEXT(entry) \ - ((struct ext4_xattr_entry *)( \ - (char *)(entry) + EXT4_XATTR_LEN((entry)->e_name_len))) -#define EXT4_XATTR_SIZE(size) \ - (((size) + EXT4_XATTR_ROUND) & ~EXT4_XATTR_ROUND) -#define EXT4_XATTR_NAME(entry) \ - ((char *)((entry) + 1)) - -#define EXT4_XATTR_IHDR(raw_inode) \ - ((struct ext4_xattr_ibody_header *) \ - ((char *)raw_inode + \ - EXT4_GOOD_OLD_INODE_SIZE + \ - (raw_inode)->extra_isize)) -#define EXT4_XATTR_IFIRST(hdr) \ - ((struct ext4_xattr_entry *)((hdr)+1)) - -#define EXT4_XATTR_BHDR(block) \ - ((struct ext4_xattr_header *)((block)->data)) -#define EXT4_XATTR_ENTRY(ptr) \ - ((struct ext4_xattr_entry *)(ptr)) -#define EXT4_XATTR_BFIRST(block) \ - EXT4_XATTR_ENTRY(EXT4_XATTR_BHDR(block)+1) -#define EXT4_XATTR_IS_LAST_ENTRY(entry) \ - (*(uint32_t *)(entry) == 0) - -#define EXT4_ZERO_XATTR_VALUE ((void *)-1) - /*****************************************************************************/ /* |
