f2fs-tools: set host-aware zoned device similar to host-managed one

It'd be good to generate zone-aware sequential writes to both of HA and HM
zoned devices.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2022-09-30 08:51:13 -07:00 committed by sunshenshen
parent 9d92496013
commit 2f3589348f
3 changed files with 3 additions and 3 deletions

View File

@ -988,7 +988,7 @@ int sanity_check_raw_super(struct f2fs_super_block *sb, enum SB_ADDR sb_addr)
}
/* Check zoned block device feature */
if (c.devices[0].zoned_model == F2FS_ZONED_HM &&
if (c.devices[0].zoned_model != F2FS_ZONED_NONE &&
!(sb->feature & cpu_to_le32(F2FS_FEATURE_BLKZONED))) {
MSG(0, "\tMissing zoned block device feature\n");
return -1;

View File

@ -456,7 +456,7 @@ static int f2fs_prepare_super_block(void)
* not overlap to metadata area.
*/
for (i = 1; i < c.ndevs; i++) {
if (c.devices[i].zoned_model == F2FS_ZONED_HM &&
if (c.devices[i].zoned_model != F2FS_ZONED_NONE &&
c.devices[i].start_blkaddr < get_sb(main_blkaddr)) {
MSG(0, "\tError: Conventional device %s is too small,"
" (%"PRIu64" MiB needed).\n", c.devices[0].path,

View File

@ -482,7 +482,7 @@ int main(int argc, char *argv[])
* Some options are mandatory for host-managed
* zoned block devices.
*/
if (c.zoned_model == F2FS_ZONED_HM && !c.zoned_mode) {
if (c.zoned_model != F2FS_ZONED_NONE && !c.zoned_mode) {
MSG(0, "\tError: zoned block device feature is required\n");
goto err_format;
}