Commit 76f105a2 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: add feature facility in superblock

This patch introduces a feature in superblock, which will indicate any new
features for f2fs.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent b5492af7
...@@ -70,6 +70,13 @@ struct f2fs_mount_info { ...@@ -70,6 +70,13 @@ struct f2fs_mount_info {
unsigned int opt; unsigned int opt;
}; };
#define F2FS_HAS_FEATURE(sb, mask) \
((F2FS_SB(sb)->raw_super->feature & cpu_to_le32(mask)) != 0)
#define F2FS_SET_FEATURE(sb, mask) \
F2FS_SB(sb)->raw_super->feature |= cpu_to_le32(mask)
#define F2FS_CLEAR_FEATURE(sb, mask) \
F2FS_SB(sb)->raw_super->feature &= ~cpu_to_le32(mask)
#define CRCPOLY_LE 0xedb88320 #define CRCPOLY_LE 0xedb88320
static inline __u32 f2fs_crc32(void *buf, size_t len) static inline __u32 f2fs_crc32(void *buf, size_t len)
......
...@@ -90,7 +90,8 @@ struct f2fs_super_block { ...@@ -90,7 +90,8 @@ struct f2fs_super_block {
__le32 cp_payload; __le32 cp_payload;
__u8 version[VERSION_LEN]; /* the kernel version */ __u8 version[VERSION_LEN]; /* the kernel version */
__u8 init_version[VERSION_LEN]; /* the initial kernel version */ __u8 init_version[VERSION_LEN]; /* the initial kernel version */
__u8 reserved[892]; /* valid reserved region */ __le32 feature; /* defined features */
__u8 reserved[888]; /* valid reserved region */
} __packed; } __packed;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment