From: Li Dongyang <dongyangli@ddn.com>
To: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Cc: "adilger@dilger.ca" <adilger@dilger.ca>
Subject: [PATCH v3 3/5] ext2fs: rename "s_overhead_blocks" to "s_overhead_clusters"
Date: Wed, 20 Nov 2019 04:35:25 +0000 [thread overview]
Message-ID: <20191120043448.249988-3-dongyangli@ddn.com> (raw)
In-Reply-To: <20191120043448.249988-1-dongyangli@ddn.com>
Rename s_overhead_blocks field from struct ext2_super_block to
make it consistent with the kernel counterpart.
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
---
debugfs/set_fields.c | 2 +-
lib/e2p/ls.c | 6 +++---
lib/ext2fs/ext2_fs.h | 2 +-
lib/ext2fs/swapfs.c | 2 +-
lib/ext2fs/tst_super_size.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c
index 5142554d..f497bd92 100644
--- a/debugfs/set_fields.c
+++ b/debugfs/set_fields.c
@@ -160,7 +160,7 @@ static struct field_set_info super_fields[] = {
{ "usr_quota_inum", &set_sb.s_usr_quota_inum, NULL, 4, parse_uint },
{ "grp_quota_inum", &set_sb.s_grp_quota_inum, NULL, 4, parse_uint },
{ "prj_quota_inum", &set_sb.s_prj_quota_inum, NULL, 4, parse_uint },
- { "overhead_blocks", &set_sb.s_overhead_blocks, NULL, 4, parse_uint },
+ { "overhead_clusters", &set_sb.s_overhead_clusters, NULL, 4, parse_uint },
{ "backup_bgs", &set_sb.s_backup_bgs[0], NULL, 4, parse_uint,
FLAG_ARRAY, 2 },
{ "checksum", &set_sb.s_checksum, NULL, 4, parse_uint },
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c
index 5a446178..5ca750f6 100644
--- a/lib/e2p/ls.c
+++ b/lib/e2p/ls.c
@@ -272,9 +272,9 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
fprintf(f, "Inode count: %u\n", sb->s_inodes_count);
fprintf(f, "Block count: %llu\n", e2p_blocks_count(sb));
fprintf(f, "Reserved block count: %llu\n", e2p_r_blocks_count(sb));
- if (sb->s_overhead_blocks)
- fprintf(f, "Overhead blocks: %u\n",
- sb->s_overhead_blocks);
+ if (sb->s_overhead_clusters)
+ fprintf(f, "Overhead clusters: %u\n",
+ sb->s_overhead_clusters);
fprintf(f, "Free blocks: %llu\n", e2p_free_blocks_count(sb));
fprintf(f, "Free inodes: %u\n", sb->s_free_inodes_count);
fprintf(f, "First block: %u\n", sb->s_first_data_block);
diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
index 3165b389..7fa8406f 100644
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -742,7 +742,7 @@ struct ext2_super_block {
/*200*/ __u8 s_mount_opts[64];
/*240*/ __u32 s_usr_quota_inum; /* inode number of user quota file */
__u32 s_grp_quota_inum; /* inode number of group quota file */
- __u32 s_overhead_blocks; /* overhead blocks/clusters in fs */
+ __u32 s_overhead_clusters; /* overhead blocks/clusters in fs */
/*24c*/ __u32 s_backup_bgs[2]; /* If sparse_super2 enabled */
/*254*/ __u8 s_encrypt_algos[4]; /* Encryption algorithms in use */
/*258*/ __u8 s_encrypt_pw_salt[16]; /* Salt used for string2key algorithm */
diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
index a1560045..63b24330 100644
--- a/lib/ext2fs/swapfs.c
+++ b/lib/ext2fs/swapfs.c
@@ -121,7 +121,7 @@ void ext2fs_swap_super(struct ext2_super_block * sb)
/* sb->s_mount_opts is __u8 and does not need swabbing */
sb->s_usr_quota_inum = ext2fs_swab32(sb->s_usr_quota_inum);
sb->s_grp_quota_inum = ext2fs_swab32(sb->s_grp_quota_inum);
- sb->s_overhead_blocks = ext2fs_swab32(sb->s_overhead_blocks);
+ sb->s_overhead_clusters = ext2fs_swab32(sb->s_overhead_clusters);
sb->s_backup_bgs[0] = ext2fs_swab32(sb->s_backup_bgs[0]);
sb->s_backup_bgs[1] = ext2fs_swab32(sb->s_backup_bgs[1]);
/* sb->s_encrypt_algos is __u8 and does not need swabbing */
diff --git a/lib/ext2fs/tst_super_size.c b/lib/ext2fs/tst_super_size.c
index a932685d..ab38dd59 100644
--- a/lib/ext2fs/tst_super_size.c
+++ b/lib/ext2fs/tst_super_size.c
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
check_field(s_mount_opts, 64);
check_field(s_usr_quota_inum, 4);
check_field(s_grp_quota_inum, 4);
- check_field(s_overhead_blocks, 4);
+ check_field(s_overhead_clusters, 4);
check_field(s_backup_bgs, 8);
check_field(s_encrypt_algos, 4);
check_field(s_encrypt_pw_salt, 16);
--
2.24.0
next prev parent reply other threads:[~2019-11-20 4:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 4:35 [PATCH v3 1/5] libext2fs: optimize ext2fs_convert_subcluster_bitmap() Li Dongyang
2019-11-20 4:35 ` [PATCH v3 2/5] mke2fs: fix setting bad blocks in the block bitmap Li Dongyang
2019-12-31 3:47 ` Theodore Y. Ts'o
2019-11-20 4:35 ` Li Dongyang [this message]
2020-01-27 3:05 ` [PATCH v3 3/5] ext2fs: rename "s_overhead_blocks" to "s_overhead_clusters" Theodore Y. Ts'o
2019-11-20 4:35 ` [PATCH v3 4/5] mke2fs: set overhead in super block Li Dongyang
2020-01-27 4:15 ` Theodore Y. Ts'o
2019-11-20 4:35 ` [PATCH v3 5/5] ext4: record " Li Dongyang
2020-01-27 2:56 ` [PATCH v3 1/5] libext2fs: optimize ext2fs_convert_subcluster_bitmap() Theodore Y. Ts'o
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=20191120043448.249988-3-dongyangli@ddn.com \
--to=dongyangli@ddn.com \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
/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).