From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Jens Axboe <jens.axboe@oracle.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: How to cleanly shut down a block device
Date: Thu, 23 Nov 2006 22:19:47 +0100 [thread overview]
Message-ID: <45661073.6020605@drzeus.cx> (raw)
In-Reply-To: <20061123210322.GB25794@flint.arm.linux.org.uk>
Russell King wrote:
> I'm not entirely convinced that del_gendisk() will prevent any new
> requests getting into the queue, which is why the comment below
> says:
>
>
Jens wasn't either, so my second patch also modifies the request
function to drop requests.
>>
>> - /*
>> - * I think this is needed.
>> - */
>> - md->disk->queue = NULL;
>>
>
> Yes, del_gendisk() removes the disk from view for new opens, but what
> about existing users?
>
I find it a bit disconcerting to modify that structure without any locks
held. Once we've given the queue to gendisk, it should do its own
reference handling. If that assign to NULL is needed then IMHO,
something is broken elsewhere and should be fixed.
> These hunks do not achieve us anything.
>
> However, what we _do_ need to do is to arrange for the MMC queue thread
> to error out all pending requests before dying if MMC_QUEUE_EXIT is set.
> That's already handled since the queue thread only ever exits if there
> are no requests pending _and_ MMC_QUEUE_EXIT has been set.
>
>
Well, Jens seemed to suggest that the proper way was not to try and
prevent everyone from putting new stuff into the queue, but to start
failing requests. Hence my changes.
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
next prev parent reply other threads:[~2006-11-23 21:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-14 7:02 How to cleanly shut down a block device Pierre Ossman
2006-11-14 7:56 ` Jens Axboe
2006-11-14 8:15 ` Pierre Ossman
2006-11-14 8:45 ` Jens Axboe
2006-11-14 8:54 ` Pierre Ossman
2006-11-14 10:24 ` Jens Axboe
2006-11-14 10:48 ` Russell King
2006-11-14 11:33 ` Pierre Ossman
2006-11-14 11:41 ` Jens Axboe
2006-11-14 11:52 ` Pierre Ossman
2006-11-14 14:34 ` Pierre Ossman
2006-11-14 20:48 ` Pierre Ossman
2006-11-23 21:03 ` Russell King
2006-11-23 21:19 ` Pierre Ossman [this message]
2006-11-14 11:48 ` Russell King
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=45661073.6020605@drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@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