mkfs/fsck: add host-managed smr feature

This feature flag will be used by f2fs to detect HMSMR device.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2016-06-13 09:36:38 -07:00
parent dc573510a3
commit 70a8fc3df7
3 changed files with 7 additions and 0 deletions

View File

@ -267,6 +267,9 @@ 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");
}
MSG(0, "\n");
MSG(0, "Info: superblock encrypt level = %d, salt = ",
sb->encryption_level);

View File

@ -457,6 +457,7 @@ enum {
#define MAX_ACTIVE_DATA_LOGS 8
#define F2FS_FEATURE_ENCRYPT 0x0001
#define F2FS_FEATURE_HMSMR 0x0002
#define MAX_VOLUME_NAME 512

View File

@ -130,6 +130,9 @@ static void f2fs_parse_options(int argc, char *argv[])
if ((optind + 1) < argc)
config.total_sectors = atoll(argv[optind+1]);
if (config.smr_mode)
config.feature |= cpu_to_le32(F2FS_FEATURE_HMSMR);
}
int main(int argc, char *argv[])