Re: [PATCH 08/12] scsi_debug: rework resp_report_luns

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

 



On 04/25/2016 09:16 AM, Douglas Gilbert wrote:
+	/* can produce response with up to 16k luns (lun 0 to lun 16383) */
+	arr = kzalloc((tlun_cnt * sizeof(lun_p->scsi_lun)) + 8, GFP_ATOMIC);

kzalloc() allocates contiguous memory. There is no guarantee that a large contiguous region will be available. Since kernel memory tends to fragment after some time, have you considered to use vmalloc() instead?

+	/*
+	 * Address method (we use Peripherial = 00b)
+	 * 10b - Logical unit
+	 * 00b - Peripherial device - Use this one
+	 * 01b - Logical device
+	 * 11b - reserved
+	 */

In SAM I found the following spelling "Peripheral" instead of "Peripherial" (two occurrences). Although everyone will understand the intention of the above comment, using the same spelling as in SAM helps people who search through the source code using grep.

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