Re: [PATCH] gdth: scp timeout clean up (try #2)

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

 



Jens Axboe [jens.axboe@xxxxxxxxxx] wrote:
> +static void blk_rq_timed_out_timer(unsigned long data)
> +{
> +	struct request_queue *q = (struct request_queue *) data;
> +	unsigned long flags, next = 0;
> +	struct request *rq, *tmp;
> +
> +	spin_lock_irqsave(q->queue_lock, flags);
> +
> +	list_for_each_entry_safe(rq, tmp, &q->timeout_list, timeout_list) {
> +		if (!next || time_before(next, rq->timeout))
> +			next = rq->timeout;
> +		if (time_after_eq(jiffies, rq->timeout)) {
> +			list_del_init(&rq->timeout_list);
> +			blk_rq_timed_out(rq);
> +		}
> +	}
> +
> +	if (next)
> +		mod_timer(&q->timeout, round_jiffies(next));
> +
> +	spin_unlock_irqrestore(q->queue_lock, flags);
> +}

Is it possible that an rq->timeout could be zero, after all it is
jiffies? If so, the code may fail to schedule a timeout in such a case.
-
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