Re: [PATCH] scsi: sd: Use READ(16) when reading block zero on large capacity disks

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

 



On 6/4/24 08:45, Martin K. Petersen wrote:
  static void sd_read_block_zero(struct scsi_disk *sdkp)
  {
-	unsigned int buf_len = sdkp->device->sector_size;
-	char *buffer, cmd[10] = { };
+	struct scsi_device *sdev = sdkp->device;
+	unsigned int buf_len = sdev->sector_size;
+	char *buffer, cmd[16] = { };

Maybe this is a good opportunity to change 'char' into 'u8'? It seems a
bit unusual to me to use signed char for a SCSI CDB and a data buffer.

Otherwise this patch looks good to me.

Thanks,

Bart.




[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