Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22bbc1ef authored by Damien Le Moal's avatar Damien Le Moal Committed by Jaegeuk Kim
Browse files

f2fs: Use generic zoned block device terminology



commit 0bfd7a091c19132489a0f977b8dbf9f6b5ae0a1c upstream.

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 rename the HMSMR feature to BLKZONED
to avoid a HDD centric terminology. For the same reason, rename
f2fs_sb_mounted_hmsmr to f2fs_sb_mounted_blkzoned.

Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 97df49a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi, int rw,
{
	if (!is_read_io(rw)) {
		atomic_inc(&sbi->nr_wb_bios);
		if (f2fs_sb_mounted_hmsmr(sbi->sb) &&
		if (f2fs_sb_mounted_blkzoned(sbi->sb) &&
			current->plug && (type == DATA || type == NODE))
			blk_finish_plug(current->plug);
	}
+3 −3
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ struct f2fs_mount_info {
};

#define F2FS_FEATURE_ENCRYPT	0x0001
#define F2FS_FEATURE_HMSMR	0x0002
#define F2FS_FEATURE_BLKZONED	0x0002

#define F2FS_HAS_FEATURE(sb, mask)					\
	((F2FS_SB(sb)->raw_super->feature & cpu_to_le32(mask)) != 0)
@@ -2470,9 +2470,9 @@ static inline int f2fs_sb_has_crypto(struct super_block *sb)
	return F2FS_HAS_FEATURE(sb, F2FS_FEATURE_ENCRYPT);
}

static inline int f2fs_sb_mounted_hmsmr(struct super_block *sb)
static inline int f2fs_sb_mounted_blkzoned(struct super_block *sb)
{
	return F2FS_HAS_FEATURE(sb, F2FS_FEATURE_HMSMR);
	return F2FS_HAS_FEATURE(sb, F2FS_FEATURE_BLKZONED);
}

static inline void set_opt_mode(struct f2fs_sb_info *sbi, unsigned int mt)
+1 −1
Original line number Diff line number Diff line
@@ -974,7 +974,7 @@ static void default_options(struct f2fs_sb_info *sbi)
	set_opt(sbi, EXTENT_CACHE);
	sbi->sb->s_flags |= MS_LAZYTIME;
	set_opt(sbi, FLUSH_MERGE);
	if (f2fs_sb_mounted_hmsmr(sbi->sb)) {
	if (f2fs_sb_mounted_blkzoned(sbi->sb)) {
		set_opt_mode(sbi, F2FS_MOUNT_LFS);
		set_opt(sbi, DISCARD);
	} else {