From: ebiederm@xmission.com (Eric W. Biederman)
To: Tejun Heo <tj@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
"Theodore Ts'o" <tytso@mit.edu>,
Kernel development list <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: Revoking filesystems [was Re: Sysfs attributes racing with unregistration]
Date: Thu, 05 Jan 2012 08:03:16 -0800 [thread overview]
Message-ID: <m1ehvecf23.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20120105153233.GA11934@google.com> (Tejun Heo's message of "Thu, 5 Jan 2012 07:32:33 -0800")
Tejun Heo <tj@kernel.org> writes:
> Hello,
>
> On Thu, Jan 05, 2012 at 10:13:31AM -0500, Alan Stern wrote:
>> I don't have a clear idea of what's involved (in particular, how to go
>> from a block_device structure to a mounted filesystem). But the place
>> to do it would probably be block/genhd.c:invalidate_partition(). Ted
>> can tell you if there's a better alternative.
>>
>> > Do you know how hard it is to detect at mount time if a block device
>> > might be hot-plugable? We can always use a mount option here and
>> > make userspace figure it out, but being to have a good default would
>> > be nice.
>>
>> I don't think it's possible to tell if a device is hot-unpluggable.
>> For example, the device itself might not be removable from its parent,
>> but the parent might be hot-unpluggable. You'll probably have to
>> assume that every device can potentially be unplugged, one way or
>> another.
>>
>> Also, even devices that aren't hot-unpluggable can fail. The end
>> result should be pretty much the same.
>
> Ummm.... I could be missing something but filesystems need to be able
> to deal with partial device failures (ie. some block can't be read)
> and hot-unplug or handling full failure is a logical extension of
> that. That's how it already works, so I don't really think that is a
> particularly good application for the revoke mechanism.
Well the choices are really:
a) On a block device hotunplug keep the device and have it simply report
everything as errors, to the filesystem. Maybe with a hint to the
filesystem that something is wrong.
b) Have a filesystem revoke method so that we don't have to keep the
unplugged block device structure around indefinitely.
It seems clear that we are neither doing (a) or (b) which results in
periodic and spectacular failures when block devices are unplugged,
because we try and access block devices that no longer exist.
Eric
next prev parent reply other threads:[~2012-01-05 16:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 16:52 Sysfs attributes racing with unregistration Alan Stern
2012-01-04 17:18 ` Tejun Heo
2012-01-04 18:13 ` Eric W. Biederman
2012-01-04 19:41 ` Alan Stern
2012-01-05 3:07 ` Eric W. Biederman
2012-01-05 15:13 ` Revoking filesystems [was Re: Sysfs attributes racing with unregistration] Alan Stern
2012-01-05 15:32 ` Tejun Heo
2012-01-05 16:03 ` Eric W. Biederman [this message]
2012-01-05 16:44 ` Tejun Heo
2012-01-05 16:47 ` Alan Stern
2012-01-05 17:11 ` Tejun Heo
2012-01-05 18:27 ` Ted Ts'o
2012-01-05 18:36 ` Tejun Heo
2012-01-05 19:28 ` Ted Ts'o
2012-01-05 20:52 ` Tejun Heo
2012-01-06 6:25 ` Alexander E. Patrakov
2012-01-07 21:01 ` Revoking filesystems [was Re: Sysfs attributes racing withunregistration] Milton Miller
2012-01-05 20:43 ` Revoking filesystems [was Re: Sysfs attributes racing with unregistration] Eric W. Biederman
2012-01-05 20:55 ` Tejun Heo
2012-01-05 18:38 ` Christoph Hellwig
2012-01-05 15:52 ` Eric W. Biederman
2013-01-14 15:11 ` watchdog code anish kumar
2012-01-05 18:18 ` Revoking filesystems [was Re: Sysfs attributes racing with unregistration] Greg KH
2012-01-04 18:13 ` Sysfs attributes racing with unregistration Alan Stern
2012-01-04 18:20 ` Tejun Heo
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=m1ehvecf23.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tj@kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).