Re: [PATCH v3 08/15] scsi_debug: add zone commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-02-21 4:44 a.m., Johannes Thumshirn wrote:
On 20/02/2020 21:09, Douglas Gilbert wrote:
+enum sdebug_z_cond {	/* enumeration names taken from table 12, zbc2r04 */
+	zbc_not_write_pointer = 0x0, /* not in table 12; conventional zone */
+	zc1_empty = 0x1,
+	zc2_implicit_open,
+	zc3_explicit_open,
+	zc4_closed,
+	zc5_full = 0xe,	/* values per Zone Condition field in Report Zones */
+	zc6_read_only = 0xd,
+	zc7_offline = 0xf,
+};

Haven't checked the rest of scsi_debug, but I'd write these enum values
in all caps. Furthermore I'd just call them EMPTY, OPEN, READ_ONLY,
FULL, OFFLINE, etc..

Yes, they should be in upper case. The ZC1, ZC2, etc are the names of
states in these T10 documents: zbc-r05.pdf and zbc2r04a.pdf . As for
the final suggestion, the C compiler thinks otherwise, so the
enumeration constants need something that is relatively unique, hence
the chosen scheme.

ZC6 and ZC7 are being dropped as they only appear in ZBC-2 which is still
at the draft level while we are trying to implement the original (and
currently only) ZBC standard.

Doug Gilbert





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux