Re: Maximum data size in a single transfer for MS driver

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

 



>>>>> "Alan" == Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:

Alan> BTW, how come you didn't write it like this?

Alan> q->limits.max_hw_sectors = max_sectors;

Alan> 	if (max_sectors < BLK_DEF_MAX_SECTORS)
Alan>       q->limits.max_sectors = max_sectors;
Alan> 	else
Alan>       q->limits.max_sectors = BLK_DEF_MAX_SECTORS;

Alan> For me this is easier to understand.

No particular reason.  Once the test args were swapped the original code
was clear to me.

However, we could do:

	q->limits.max_hw_sectors = max_hw_sectors;
	q->limits.max_sectors = min(max_hw_sectors, BLK_DEF_MAX_SECTORS);

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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