Re: [PATCH 3/9] sd: configure ZBC devices

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

 



On 04/15/2016 05:47 PM, Bart Van Assche wrote:
On 04/04/2016 03:00 AM, Hannes Reinecke wrote:
+static int
+sd_zbc_report_zones(struct scsi_disk *sdkp, sector_t start_lba,
+            unsigned char *buffer, int bufflen )
+{
[ ... ]
+    put_unaligned_be64(start_lba, &cmd[2]);
+    put_unaligned_be32(bufflen, &cmd[10]);

The argument "sector_t start_lba" is confusing me. Isn't a number either
a sector number or an LBA? Shouldn't that number be shifted right by
ilog2(sdp->sector_size) - 9 before storing it in the CDB?

Well. I've considered the 'lba' the native disk lba, and sector the (logical) sector number from the block layer. I was under the impression that this was the correct nomenclature here; if not I'm happy to change it.

But yes, I should be adding a documentation to that function.

Cheers,

Hannes
--
Dr. Hannes Reinecke		      zSeries & Storage
hare@xxxxxxx			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux