summaryrefslogtreecommitdiff
path: root/fs/erofs/erofs_fs.h
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2019-09-04 10:08:54 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-05 20:10:07 +0200
commit8a76568225deae18cea1d1a21c2bade2f2ced2ba (patch)
tree1156c41d308d2a292b6c7ed5aa0fe916b10ec495 /fs/erofs/erofs_fs.h
parent426a930891cf17c5c16f12e8e2c8cb75c4cfff3c (diff)
erofs: better naming for erofs inode related stuffs
updates inode naming - kill is_inode_layout_compression [1] - kill magic underscores [2] [3] - better naming for datamode & data_mapping_mode [3] - better naming erofs_inode_{compact, extended} [4] [1] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/ [2] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/ [3] https://lore.kernel.org/r/20190902122627.GN15931@infradead.org/ [4] https://lore.kernel.org/r/20190902125438.GA17750@infradead.org/ Reported-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190904020912.63925-8-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/erofs/erofs_fs.h')
-rw-r--r--fs/erofs/erofs_fs.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h
index b2aef3bc377d..18689e916e94 100644
--- a/fs/erofs/erofs_fs.h
+++ b/fs/erofs/erofs_fs.h
@@ -41,7 +41,7 @@ struct erofs_super_block {
};
/*
- * erofs inode data mapping:
+ * erofs inode datalayout:
* 0 - inode plain without inline data A:
* inode, [xattrs], ... | ... | no-holed data
* 1 - inode VLE compression B (legacy):
@@ -57,7 +57,7 @@ enum {
EROFS_INODE_FLAT_COMPRESSION_LEGACY = 1,
EROFS_INODE_FLAT_INLINE = 2,
EROFS_INODE_FLAT_COMPRESSION = 3,
- EROFS_INODE_LAYOUT_MAX
+ EROFS_INODE_DATALAYOUT_MAX
};
static inline bool erofs_inode_is_data_compressed(unsigned int datamode)
@@ -68,14 +68,14 @@ static inline bool erofs_inode_is_data_compressed(unsigned int datamode)
/* bit definitions of inode i_advise */
#define EROFS_I_VERSION_BITS 1
-#define EROFS_I_DATA_MAPPING_BITS 3
+#define EROFS_I_DATALAYOUT_BITS 3
#define EROFS_I_VERSION_BIT 0
-#define EROFS_I_DATA_MAPPING_BIT 1
+#define EROFS_I_DATALAYOUT_BIT 1
/* 32-byte reduced form of an ondisk inode */
-struct erofs_inode_v1 {
- __le16 i_advise; /* inode hints */
+struct erofs_inode_compact {
+ __le16 i_format; /* inode format hints */
/* 1 header + n-1 * 4 bytes inline xattr to keep continuity */
__le16 i_xattr_icount;
@@ -98,13 +98,13 @@ struct erofs_inode_v1 {
};
/* 32 bytes on-disk inode */
-#define EROFS_INODE_LAYOUT_V1 0
+#define EROFS_INODE_LAYOUT_COMPACT 0
/* 64 bytes on-disk inode */
-#define EROFS_INODE_LAYOUT_V2 1
+#define EROFS_INODE_LAYOUT_EXTENDED 1
/* 64-byte complete form of an ondisk inode */
-struct erofs_inode_v2 {
- __le16 i_advise; /* inode hints */
+struct erofs_inode_extended {
+ __le16 i_format; /* inode format hints */
/* 1 header + n-1 * 4 bytes inline xattr to keep continuity */
__le16 i_xattr_icount;
@@ -299,8 +299,8 @@ struct erofs_dirent {
static inline void erofs_check_ondisk_layout_definitions(void)
{
BUILD_BUG_ON(sizeof(struct erofs_super_block) != 128);
- BUILD_BUG_ON(sizeof(struct erofs_inode_v1) != 32);
- BUILD_BUG_ON(sizeof(struct erofs_inode_v2) != 64);
+ BUILD_BUG_ON(sizeof(struct erofs_inode_compact) != 32);
+ BUILD_BUG_ON(sizeof(struct erofs_inode_extended) != 64);
BUILD_BUG_ON(sizeof(struct erofs_xattr_ibody_header) != 12);
BUILD_BUG_ON(sizeof(struct erofs_xattr_entry) != 4);
BUILD_BUG_ON(sizeof(struct z_erofs_map_header) != 8);