Re: [PATCH] scsi/sd_zbc: Use READ(10)/WRITE(10) for zoned UFS devices

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

 



On 2024/02/29 15:25, Bart Van Assche wrote:
> On 2/29/24 14:45, Damien Le Moal wrote:
>> On 2024/02/29 14:39, Bart Van Assche wrote:
>>> diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
>>> index 26af5ab7d7c1..d4d6b3056410 100644
>>> --- a/drivers/scsi/sd_zbc.c
>>> +++ b/drivers/scsi/sd_zbc.c
>>> @@ -734,6 +734,8 @@ static int sd_zbc_check_capacity(struct scsi_disk
>>> *sdkp, unsigned char *buf,
>>>    					(unsigned long long)sdkp->capacity,
>>>    					(unsigned long long)max_lba + 1);
>>>    			sdkp->capacity = max_lba + 1;
>>> +			if (sdkp->capacity > 0xffffffff)
>>> +				sdkp->device->use_16_for_rw = 1;
>>
>> While correct, I do not think that this change is needed. With the first hunk in
>> place, a TYPE_ZBC device will be forced to use RW-16, regardless of the device
>> capacity.
> 
> The first hunk of this patch is for ATA devices only. I want to make sure that
> .use_16_for_rw is set for non-ATA devices if there are LBAs that need more than
> 32 bits.

I missed that ! OK. So, you want to keep RW-16 forced for HDDs, but only have
RW-10 for zoned UFS devices, is this correct ? If it is, then question: what is
the device type reported by zoned UFS drives ? If it is TYPE_ZBC, then we should
follow SBC specs and thus have RW-16 mandatory. Is UFS, again, not following
completely the scsi specifications ?

I would really prefer to not spread this setting between scsi sd and
libata-scsi. I also do not like that your change for the scsi side depends on
the capacity instead on the device type. Small capacity ZBC drives can be
created with scsi_debug or tcmu-runner zbc handler, and these should use RW-16
as per the specifications too.

> 
> Thanks,
> 
> Bart.

-- 
Damien Le Moal
Western Digital Research





[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