Skip to content

Commit

Permalink
udev: distinguish host-managed zoned block in scsi_id
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chenjiayi authored and bluca committed Jan 12, 2024
1 parent ffcb864 commit 204594e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/udev/scsi_id/scsi_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 204594e

Please sign in to comment.