mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
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:
parent
dc573510a3
commit
70a8fc3df7
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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[])
|
||||
|
Loading…
Reference in New Issue
Block a user