@@ -302,9 +302,9 @@ void print_inode_info(struct f2fs_sb_info *sbi,
}
if (c.feature & cpu_to_le32(F2FS_FEATURE_COMPRESSION)) {
DISP_u64(inode, i_compr_blocks);
- DISP_u32(inode, i_compress_algorithm);
- DISP_u32(inode, i_log_cluster_size);
- DISP_u32(inode, i_compress_flag);
+ DISP_u8(inode, i_compress_algorithm);
+ DISP_u8(inode, i_log_cluster_size);
+ DISP_u16(inode, i_compress_flag);
}
}
@@ -282,6 +282,17 @@ static inline uint64_t bswap_64(uint64_t val)
printf("%-30s" fmt, #member, ((ptr)->member)); \
} while (0)
+#define DISP_u8(ptr, member) \
+ do { \
+ assert(sizeof((ptr)->member) == 1); \
+ if (c.layout) \
+ printf("%-30s %u\n", \
+ #member":", ((ptr)->member)); \
+ else \
+ printf("%-30s" "\t\t[0x%8x : %u]\n", \
+ #member, ((ptr)->member), ((ptr)->member)); \
+ } while (0)
+
#define DISP_u16(ptr, member) \
do { \
assert(sizeof((ptr)->member) == 2); \
Introduce DISP_u8(), and use DISP_u16() and DISP_u8() to print below fields: - i_compress_algorithm - i_log_cluster_size - i_compress_flag Signed-off-by: Chao Yu <chao@kernel.org> --- fsck/mount.c | 6 +++--- include/f2fs_fs.h | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-)