f2fs-tools: use zoned block device terminology
SMR stands for "Shingled Magnetic Recording" which makes sense
only for hard disk drives (spinning rust). The ZBC/ZAC standards
enable management of SMR disks, but solid state drives may also
support those standards. So replace "SMR" with "zoned block device"
to avoid a HDD centric terminology.
In particular, rename the HMSMR feature to BLKZONED.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
diff --git a/fsck/mount.c b/fsck/mount.c
index 0a47bf7..b70ffe7 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -273,8 +273,8 @@
if (f & cpu_to_le32(F2FS_FEATURE_ENCRYPT)) {
MSG(0, "%s", " encrypt");
}
- if (f & cpu_to_le32(F2FS_FEATURE_HMSMR)) {
- MSG(0, "%s", " host-managed SMR");
+ if (f & cpu_to_le32(F2FS_FEATURE_BLKZONED)) {
+ MSG(0, "%s", " zoned block device");
}
MSG(0, "\n");
MSG(0, "Info: superblock encrypt level = %d, salt = ",
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 56cdcab..a1b5a4c 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -302,7 +302,7 @@
char *mount_point;
/* to detect zbc error */
- int smr_mode;
+ int zoned_mode;
u_int32_t nr_zones;
u_int32_t nr_conventional;
size_t zone_sectors;
@@ -458,7 +458,7 @@
#define MAX_ACTIVE_DATA_LOGS 8
#define F2FS_FEATURE_ENCRYPT 0x0001
-#define F2FS_FEATURE_HMSMR 0x0002
+#define F2FS_FEATURE_BLKZONED 0x0002
#define MAX_VOLUME_NAME 512
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 63cf6d4..5407ff5 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -746,12 +746,12 @@
}
#ifndef WITH_ANDROID
- if (c.smr_mode) {
+ if (c.zoned_mode) {
if (zbc_scsi_report_zones()) {
- MSG(0, "\tError: Not proper SMR drive\n");
+ MSG(0, "\tError: Not proper zoned block device\n");
return -1;
}
- MSG(0, "Info: SMR - ZONES = %u, CONV = %u, ZONE_SECTS = %lu\n",
+ MSG(0, "Info: Zoned block device - ZONES = %u, CONV = %u, ZONE_SECTS = %lu\n",
c.nr_zones, c.nr_conventional,
c.zone_sectors);
if (c.segs_per_sec == 1)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 1453b6b..df7365a 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -723,7 +723,7 @@
#ifndef WITH_ANDROID
static int discard_obsolete_dnode(struct f2fs_node *raw_node, u_int64_t offset)
{
- if (c.smr_mode)
+ if (c.zoned_mode)
return 0;
do {
if (offset < get_sb(main_blkaddr) ||
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index 37967ac..3fda98c 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -37,7 +37,7 @@
MSG(0, " -s # of segments per section [default:1]\n");
MSG(0, " -z # of sections per zone [default:1]\n");
MSG(0, " -t 0: nodiscard, 1: discard [default:1]\n");
- MSG(0, " -m support SMR device [default:0]\n");
+ MSG(0, " -m support zoned block device [default:0]\n");
MSG(0, "sectors: number of sectors. [default: determined by device size]\n");
exit(1);
}
@@ -97,7 +97,7 @@
c.vol_label = optarg;
break;
case 'm':
- c.smr_mode = 1;
+ c.zoned_mode = 1;
break;
case 'o':
c.overprovision = atof(optarg);
@@ -130,8 +130,8 @@
if ((optind + 1) < argc)
c.total_sectors = atoll(argv[optind+1]);
- if (c.smr_mode)
- c.feature |= cpu_to_le32(F2FS_FEATURE_HMSMR);
+ if (c.zoned_mode)
+ c.feature |= cpu_to_le32(F2FS_FEATURE_BLKZONED);
}
int main(int argc, char *argv[])