diff options
author | Chao Yu <chao@kernel.org> | 2023-05-05 18:02:01 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-05-17 18:13:02 -0700 |
commit | 98b7ba656e5177ae863501da3da6a6d76999c086 (patch) | |
tree | 02f9ac86c286d6e9f455f4cd7019cd923a44e9de | |
parent | 8a164d867888d34ec3c6bb7671d8e58545943e90 (diff) | |
download | f2fs-tools-98b7ba656e5177ae863501da3da6a6d76999c086.tar.gz |
f2fs-tools: rename i_padding to i_compress_flag
Commit b28f047b28c5 ("f2fs: compress: support chksum") renames i_padding
to i_compress_flag in struct f2fs_inode, adjust f2fs-tools' codes as well.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fsck/mount.c | 2 | ||||
-rw-r--r-- | include/f2fs_fs.h | 5 | ||||
-rw-r--r-- | mkfs/f2fs_format.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/fsck/mount.c b/fsck/mount.c index 9209558..7385060 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -304,7 +304,7 @@ void print_inode_info(struct f2fs_sb_info *sbi, DISP_u64(inode, i_compr_blocks); DISP_u32(inode, i_compress_algrithm); DISP_u32(inode, i_log_cluster_size); - DISP_u32(inode, i_padding); + DISP_u32(inode, i_compress_flag); } } diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 057cd4c..f20e734 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -1076,7 +1076,10 @@ struct f2fs_inode { __le64 i_compr_blocks; /* # of compressed blocks */ __u8 i_compress_algrithm; /* compress algrithm */ __u8 i_log_cluster_size; /* log of cluster size */ - __le16 i_padding; /* padding */ + __le16 i_compress_flag; /* compress flag */ + /* 0 bit: chksum flag + * [8,15] bits: compress level + */ __le32 i_extra_end[0]; /* for attribute size calculation */ } __attribute__((packed)); __le32 i_addr[DEF_ADDRS_PER_INODE]; /* Pointers to data blocks */ diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 3e49057..f11774e 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs/f2fs_format.c @@ -1289,7 +1289,7 @@ static int f2fs_write_root_inode(void) if (c.feature & cpu_to_le32(F2FS_FEATURE_COMPRESSION)) { raw_node->i.i_compress_algrithm = 0; raw_node->i.i_log_cluster_size = 0; - raw_node->i.i_padding = 0; + raw_node->i.i_compress_flag = 0; } data_blk_nor = get_sb(main_blkaddr) + @@ -1611,7 +1611,7 @@ static int f2fs_write_lpf_inode(void) if (c.feature & cpu_to_le32(F2FS_FEATURE_COMPRESSION)) { raw_node->i.i_compress_algrithm = 0; raw_node->i.i_log_cluster_size = 0; - raw_node->i.i_padding = 0; + raw_node->i.i_compress_flag = 0; } data_blk_nor = f2fs_add_default_dentry_lpf(); |