From: malahal@us.ibm.com
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>,
linux-scsi@vger.kernel.org, Achim_Leubner@adaptec.com
Subject: Re: [PATCH] gdth: scp timeout clean up (try #2)
Date: Tue, 13 Nov 2007 18:39:29 -0800 [thread overview]
Message-ID: <20071114023929.GB29136@us.ibm.com> (raw)
In-Reply-To: <20071107132256.GG5525@kernel.dk>
Jens Axboe [jens.axboe@oracle.com] 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.
next prev parent reply other threads:[~2007-11-14 2:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 6:54 [PATCH] gdth: scp timeout clean up malahal
2007-11-06 7:54 ` Boaz Harrosh
2007-11-06 16:18 ` malahal
2007-11-06 22:34 ` [PATCH] gdth: scp timeout clean up (try #2) malahal
2007-11-07 13:22 ` Jens Axboe
2007-11-14 2:39 ` malahal [this message]
2007-12-03 1:53 ` [PATCH] blk request timeout minor fixes malahal
2007-12-03 2:49 ` Matthew Wilcox
2007-12-03 23:47 ` malahal
2007-12-04 9:00 ` Jens Axboe
2007-12-05 20:05 ` malahal
2007-12-05 20:10 ` Jens Axboe
2007-12-05 20:40 ` malahal
2007-12-05 21:06 ` Another use for block-layer timeouts Matthew Wilcox
2007-11-07 17:35 ` [PATCH] gdth: scp timeout clean up (try #2) Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071114023929.GB29136@us.ibm.com \
--to=malahal@us.ibm.com \
--cc=Achim_Leubner@adaptec.com \
--cc=bharrosh@panasas.com \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.