f2fs-tools: use zoned block device terminology
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 28 Oct 2016 07:56:59 +0000 (16:56 +0900)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 31 Oct 2016 21:52:27 +0000 (14:52 -0700)
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>
fsck/mount.c
include/f2fs_fs.h
lib/libf2fs.c
mkfs/f2fs_format.c
mkfs/f2fs_format_main.c

index 0a47bf7..b70ffe7 100644 (file)
@@ -273,8 +273,8 @@ void print_sb_state(struct f2fs_super_block *sb)
        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 = ",
index 56cdcab..a1b5a4c 100644 (file)
@@ -302,7 +302,7 @@ struct f2fs_configuration {
        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 @@ enum {
 #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
 
index 63cf6d4..5407ff5 100644 (file)
@@ -746,12 +746,12 @@ int f2fs_get_device_info(void)
        }
 
 #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)
index 1453b6b..df7365a 100644 (file)
@@ -723,7 +723,7 @@ static int f2fs_write_super_block(void)
 #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) ||
index 37967ac..3fda98c 100644 (file)
@@ -37,7 +37,7 @@ static void mkfs_usage()
        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 @@ static void f2fs_parse_options(int argc, char *argv[])
                        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 @@ static void f2fs_parse_options(int argc, char *argv[])
        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[])