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.
Thanks,
Bart.