From: Pete Zaitcev <zaitcev@redhat.com>
To: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Cc: jens.axboe@oracle.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
dm-devel@redhat.com, j-nomura@ce.jp.nec.com, zaitcev@redhat.com
Subject: Re: [PATCH 12/30] blk_end_request: changing ub (take 4)
Date: Thu, 13 Dec 2007 13:59:16 -0800 [thread overview]
Message-ID: <20071213135916.27ebe3f9.zaitcev@redhat.com> (raw)
In-Reply-To: <20071212.153815.39152138.k-ueda@ct.jp.nec.com>
On Wed, 12 Dec 2007 15:38:15 -0500 (EST), Kiyoshi Ueda <k-ueda@ct.jp.nec.com> wrote:
> On Tue, 11 Dec 2007 15:48:03 -0800, Pete Zaitcev <zaitcev@redhat.com> wrote:
> > > - end_that_request_first(rq, uptodate, rq->hard_nr_sectors);
> > > - end_that_request_last(rq, uptodate);
> > > + if (__blk_end_request(rq, error, blk_rq_bytes(rq)))
> > > + BUG();
> > My understanding was, blk_end_request() is the same thing, only
> > takes the queue lock. But then, should I refactor ub so that it
> > calls __blk_end_request if request function ends with an error
> > and blk_end_request if the end-of-IO even is processed?
> I'm using __blk_end_request() here and I think it's sufficient, because:
> o end_that_request_last() must be called with the queue lock held
> o ub_end_rq() calls end_that_request_last() without taking
> the queue lock in itself.
> So the queue lock must have been taken outside ub_end_rq().
> But, if ub is calling end_that_request_last() without the queue lock,
> it is a bug in the original code and we should use blk_end_request()
> to fix that.
So, I have to rewrite ub to split the paths after all, right?
Let's do this then: I'll wait until your patch gets to Linus and
then update it with the split. The reason is, I need the whole
enchilada applied and I don't want to bother tracking iterations
and all the little segments (of which you already have 30).
Until then, ub will have a race by using your original small patch.
Best wishes,
-- Pete
next prev parent reply other threads:[~2007-12-13 21:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 22:46 [PATCH 12/30] blk_end_request: changing ub (take 4) Kiyoshi Ueda
2007-12-11 23:48 ` Pete Zaitcev
2007-12-12 20:38 ` Kiyoshi Ueda
2007-12-13 21:59 ` Pete Zaitcev [this message]
2007-12-14 17:04 ` Kiyoshi Ueda
2007-12-14 19:49 ` Pete Zaitcev
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=20071213135916.27ebe3f9.zaitcev@redhat.com \
--to=zaitcev@redhat.com \
--cc=dm-devel@redhat.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=jens.axboe@oracle.com \
--cc=k-ueda@ct.jp.nec.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).