From: Jens Axboe <axboe@kernel.dk>
To: Tejun Heo <tj@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Richard Weinberger <richard@nod.at>,
"jdike@addtoit.com" <jdike@addtoit.com>,
"user-mode-linux-devel@lists.sourceforge.net"
<user-mode-linux-devel@lists.sourceforge.net>,
"user-mode-linux-user@lists.sourceforge.net"
<user-mode-linux-user@lists.sourceforge.net>,
"janjaap@bos.nl" <janjaap@bos.nl>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
"syzop@vulnscan.org" <syzop@vulnscan.org>,
Chris Frey <cdfrey@foursquare.net>, stable <stable@kernel.org>
Subject: Re: [PATCH v2.6.36-rc7] ubd: fix incorrect sector handling during request restart
Date: Fri, 15 Oct 2010 12:56:43 +0200 [thread overview]
Message-ID: <4CB8336B.9030400@kernel.dk> (raw)
In-Reply-To: <4CB81C91.7070406@kernel.org>
On 2010-10-15 11:19, Tejun Heo wrote:
> Commit f81f2f7c (ubd: drop unnecessary rq->sector manipulation)
> dropped request->sector manipulation in preparation for global request
> handling cleanup; unfortunately, it incorrectly assumed that the
> updated sector wasn't being used.
>
> ubd tries to issue as many requests as possible to io_thread. When
> issuing fails due to memory pressure or other reasons, the device is
> put on the restart list and issuing stops. On IO completion, devices
> on the restart list are scanned and IO issuing is restarted.
>
> ubd issues IOs sg-by-sg and issuing can be stopped in the middle of a
> request, so each device on the restart queue needs to remember where
> to restart in its current request. ubd needs to keep track of the
> issue position itself because,
>
> * blk_rq_pos(req) is now updated by the block layer to keep track of
> _completion_ position.
>
> * Multiple io_req's for the current request may be in flight, so it's
> difficult to tell where blk_rq_pos(req) currently is.
>
> Add ubd->rq_pos to keep track of the issue position and use it to
> correctly restart io_req issue.
Thanks Tejun, good to see this one resolved.
--
Jens Axboe
prev parent reply other threads:[~2010-10-15 10:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 9:19 Tejun Heo
2010-10-15 10:56 ` Jens Axboe [this message]
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=4CB8336B.9030400@kernel.dk \
--to=axboe@kernel.dk \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cdfrey@foursquare.net \
--cc=geert@linux-m68k.org \
--cc=janjaap@bos.nl \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=richard@nod.at \
--cc=stable@kernel.org \
--cc=syzop@vulnscan.org \
--cc=tj@kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=user-mode-linux-user@lists.sourceforge.net \
/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
Powered by JetHome