From: Boaz Harrosh <bharrosh@panasas.com>
To: jens.axboe@oracle.com, James.Bottomley@HansenPartnership.com,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-scsi@vger.kernel.org, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC] block: Don't let blk_put_request leak BIOs
Date: Thu, 12 Feb 2009 15:49:21 +0200 [thread overview]
Message-ID: <499428E1.1000009@panasas.com> (raw)
In-Reply-To: <499413DB.2020208@panasas.com>
Boaz Harrosh wrote:
> If a block ULD had allocated a request and mapped some memory into it,
> using one of blk_rq_map_xxx routines, but then for some reason failed to
> execute the request through one of the blk_execute_request routines.
> Then the associated BIO would leak, unless ULD resorts to low-level loops
> intimate of block internals.
>
> [RFC]
> This code will also catch situations where LLD failed to complete
> the request before aborting it. Such situations are a BUG. Should we
> use WARN_ON_ONCE() in that case. The situation above is possible and
> can happen normally in memory pressure situations so maybe we should
> devise a bit-flag that ULD denotes that the request was aborted and
> only WARN_ON if flag was not set.
>
> I'm sending this before any-tests so people can comment on possible
> pitfalls.
>
> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
> ---
I've booted a Linux PC with lots of sata disks, connected an iscsi
target, ran OSD tests. It looks like it's working which means
request->bio is set to NULL after it is used in the regular path.
This needs to sit in Linux next and be tested for a long while.
Jens I'll be waiting for your comment and will send a proper
patch for the block bits. We will have to time this with James
to see when the OSD bits can be submitted after that, then TOMO's
patch for un-exporting blk_req_append_bio can be merged. Or maybe
it can all go in one patch through scsi?
Thanks
Boaz
next prev parent reply other threads:[~2009-02-12 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4993DCCA.8080508@panasas.com>
[not found] ` <20090212174124S.fujita.tomonori@lab.ntt.co.jp>
[not found] ` <4993E85A.20805@panasas.com>
[not found] ` <20090212184208X.fujita.tomonori@lab.ntt.co.jp>
2009-02-12 12:19 ` [PATCH] [RFC] block: Don't let blk_put_request leak BIOs Boaz Harrosh
2009-02-12 13:49 ` Boaz Harrosh [this message]
2009-02-12 13:56 ` Boaz Harrosh
2009-02-12 17:27 ` [PATCH 1/2] " Boaz Harrosh
2009-02-12 17:30 ` [PATCH 2/2] [RFC] libosd: Don't let osd abuse block internals, now that it's fixed Boaz Harrosh
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=499428E1.1000009@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jens.axboe@oracle.com \
--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