mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
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:
parent
9d92496013
commit
2f3589348f
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user