On 10/31/22 20:23, Damien Le Moal wrote:
On 11/1/22 07:47, Bart Van Assche wrote:
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1899,6 +1899,10 @@ static int resp_readcap16(struct scsi_cmnd *scp,
arr[14] |= 0x40;
}
+ /* Set RC BASIS = 1 for host-managed devices. */
No it is not necessarily set. It is up to the device vendor to choose if
RC_BASIS is set or not, based on the device implementation.
Applicability of RC = 0 or RC = 1 depends on the presence of conventional
zones. so:
1) If there are conventional zones, then using RC_BASIS = 1 or = 0 are
both OK with HM devices. In the case of RC_BASIS = 0, the host can issue a
report zones and get the device max lba from the report header (sd_zbc.c
does that).
2) If there are no conventional zones, then using RC_BASIS = 0 does not
make much sense, but nothing in the ZBC text prevent it either...
So we should refine this and maybe add an option to allow specifying rc
basis ?
Hi Damien,
If I remember correctly the conclusion from a previous conversation is
that setting RC BASIS = 1 for host-managed devices is what is done by
all SMR vendors and is always correct for host-managed devices.
I think the description of the my patch is correct, namely that it makes
the READ CAPACITY response compliant with ZBC. I did not claim that my
patch is the only possible approach for making the READ CAPACITY
response ZBC compliant.
Are there any use cases for reporting RC BASIS = 0 in combination with
the capacity of conventional zones for host-managed devices other than
testing the Linux kernel ZBC code?
Thanks,
Bart.