From: johnb@codexdigital.com (John Beard)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Block device driver: how to terminate the block device if media disappears?
Date: Mon, 07 Jan 2013 10:49:31 +0000 [thread overview]
Message-ID: <50EAA83B.7010004@codexdigital.com> (raw)
In-Reply-To: <CALF0-+XuNEqJgSxqzNjSZrBFS+cEVtGHsAoaiYKeTU56Fb+A9g@mail.gmail.com>
On 21/12/12 18:23, Ezequiel Garcia wrote:
> On Thu, Dec 13, 2012 at 12:31 PM, John Beard <johnb@codexdigital.com> wrote:
>>
>> What is the right way to terminate requests and delete the gendisk in
>> the case of physically vanished PCI devices (or even devices in general)?
>>
>
> There are several block driver examples in drivers/block.
> Or you might want to take a loot at mtdblock.c, or perhaps
> this simple ubiblock implementation:
>
> http://lwn.net/Articles/525957/
Thanks, Ezequiel - sorry for the delay, I haven't had a chance to touch
my development computer over the break. The workqueue-based approach
from ubiblock.c seems to have solved the problem and the device can now
shut down happily once the request queue is emptied in the submit_req
call following device removal.
Thanks again for your help!
John Beard
next prev parent reply other threads:[~2013-01-07 10:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 15:31 Block device driver: how to terminate the block device if media disappears? John Beard
2012-12-21 18:23 ` Ezequiel Garcia
2013-01-07 10:49 ` John Beard [this message]
2013-01-12 17:39 ` Ezequiel Garcia
2013-01-12 17:56 ` anish kumar
-- strict thread matches above, loose matches on Subject: below --
2012-12-19 11:21 John Beard
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=50EAA83B.7010004@codexdigital.com \
--to=johnb@codexdigital.com \
--cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.