linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH 2/6] f2fs-tools: rename i_padding to i_compress_flag
Date: Fri,  5 May 2023 18:02:01 +0800	[thread overview]
Message-ID: <20230505100205.1921708-2-chao@kernel.org> (raw)
In-Reply-To: <20230505100205.1921708-1-chao@kernel.org>

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>
---
 fsck/mount.c       | 2 +-
 include/f2fs_fs.h  | 5 ++++-
 mkfs/f2fs_format.c | 4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/fsck/mount.c b/fsck/mount.c
index df0314d..2e1634f 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 c71b59d..7ad1c40 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 d3bb622..11804eb 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();
-- 
2.25.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2023-05-05 10:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 10:02 [f2fs-dev] [PATCH 1/6] f2fs-tools: add packed attribute for struct f2fs_super_block Chao Yu
2023-05-05 10:02 ` Chao Yu [this message]
2023-05-05 10:02 ` [f2fs-dev] [PATCH 3/6] f2fs-tools: fix typo in f2fs_inode structure Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 4/6] f2fs-tools: add DISP_u8() macro Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 5/6] f2fs-tools: print more raw sb info Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 6/6] f2fs-tools: use f2fs_init_inode() to clean up codes Chao Yu
2023-05-08 19:42   ` Jaegeuk Kim
2023-05-17  2:02     ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230505100205.1921708-2-chao@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).