From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Jens Axboe <axboe@kernel.dk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 1/2] Disk hot removal causing oopses and fixes
Date: Tue, 03 Nov 2009 20:51:29 +0100 [thread overview]
Message-ID: <4AF089C1.4010806@s5r6.in-berlin.de> (raw)
In-Reply-To: <20091103115444.GA8507@angel.research.nokia.com>
Jarkko Lavinen wrote:
> Hi Steven
>
> Sorry for late reply.
>
>> It has to reference-count its objects so that they are not freed as long
>> as they are used by upper layers,
>
> The block layer and device removal seems to be designed from
> top-down approach. Althouh disc is referenced from
> __blkdev_get(), disc's request queue is not. Also
> blk_cleanup_queue() calls elevator_exit() without caring if
> anyone still uses the elevator.
[...]
I still don't understand how there can be a problem here. Shouldn't the
sequence be:
1. low-level determines that a device went away
2. low-level takes note that from now on no new requests must be
enqueued anymore
3. low-level calls blk_cleanup_queue
4. blk_cleanup_queue waits until remaining requests are done
(it calls blk_sync_queue)
5. blk_cleanup_queue cleans up block layer data
6. low-level can now clean up/ free its own data
Does the MMC layer miss step 2? Because without this, step 4 would be
in vain.
--
Stefan Richter
-=====-==--= =-== ---==
http://arcgraph.de/sr/
prev parent reply other threads:[~2009-11-03 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 16:12 [PATCH 1/2] Disk hot removal causing oopses and fixes Jarkko Lavinen
2009-10-21 16:14 ` [PATCH 2/2] " Jarkko Lavinen
2009-10-21 20:55 ` [PATCH 1/2] " Stefan Richter
2009-10-21 21:19 ` Stefan Richter
2009-11-03 11:54 ` Jarkko Lavinen
2009-11-03 19:51 ` Stefan Richter [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=4AF089C1.4010806@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=axboe@kernel.dk \
--cc=jarkko.lavinen@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@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