Re: [PATCH 7/7] scsi: Add 'eh_deadline' to limit SCSI EH runtime

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

 



On 06/10/13 13:11, Hannes Reinecke wrote:
+static int sdev_eh_deadline(struct Scsi_Host *shost,
+			   unsigned long eh_start)
+{
+	if (!shost->eh_deadline)
+		return 0;
+
+	if (shost->last_reset != 0 &&
+	    time_before(shost->last_reset, eh_start))
+		eh_start = shost->last_reset;
+
+	if (time_before(jiffies,
+			eh_start + shost->eh_deadline))
+		return 0;
+
+	return 1;
+}
+
+static int scsi_host_eh_deadline(struct Scsi_Host *shost)
+{
+	if (!shost->last_reset)
+		return 0;
+
+	return sdev_eh_deadline(shost, shost->last_reset);
+}

Hello Hannes,

I would appreciate if you would choose other names for these two functions and also for shost->eh_deadline. To me a deadline is a time instant. As far as I can see the two functions above check whether a deadline has been passed, and shost->eh_deadline is a time interval. How about the following names: sdev_eh_past_deadline(), shost_eh_past_deadline() and shost->max_eh_jiffies ?

Thanks,

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