1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-29 06:50:16 +03:00

udev: distinguish host-managed zoned block in scsi_id

According to SPC4, the value of 0x14 is reserved to distinguish
host managed zoned block, e.g., some SMR (Shingled Magnetic Recording)
disks.

Other utilities such as sg3_utils can successfully recognize such
kind of disks. This patch implements the same ability.
This commit is contained in:
chenjiayi 2024-01-08 19:45:18 +08:00 committed by Luca Boccassi
parent ffcb8647ca
commit 204594ecf1

View File

@ -84,6 +84,13 @@ static void set_type(unsigned type_num, char *to, size_t len) {
case 0xf:
type = "optical";
break;
case 0x14:
/*
* Use "zbc" here to be brief and consistent with "lsscsi" command.
* Other tools, e.g., "sg3_utils" would say "host managed zoned block".
*/
type = "zbc";
break;
default:
type = "generic";
break;