From: Theodore Tso <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Bart Van Assche <bart.vanassche@gmail.com>,
Oliver Neukum <oliver@neukum.org>, Ingo Molnar <mingo@elte.hu>,
Arjan van de Ven <arjan@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Greg KH <greg@kroah.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Top 10 bugs/warnings for the week of March 23rd, 2008
Date: Mon, 26 May 2008 13:50:39 -0400 [thread overview]
Message-ID: <20080526175039.GC11330@mit.edu> (raw)
In-Reply-To: <20080526173848.GM32407@duck.suse.cz>
On Mon, May 26, 2008 at 07:38:48PM +0200, Jan Kara wrote:
> > Looking at the filesystem UUID could help -- this is an ID that is
> > present as data on the disk, and that is even independent of the bus
> > type. See also /dev/disk/by-uuid.
> Yes, but as Oliver wrote if someone modified the filesystem in the mean
> time, you won't notice it - UUID doesn't help here.
That part you could figure out in userspace, by looking at the last
mount and last modified time in the superblock. But the problem is
it's too late. If you had buffers which had been "in flight" at the
time when the USB stick was pulled, the kernel isn't going to be able
to send them to the new instantiation of the device for the freshly
installed USB stick. And I don't think we want to put
filesystem-specific UUID and superblock parsing code in the generic
USB layer!
I suspect that if we want to do this, the only way would be with
massive amounts of userspace help, and with the dm layer interposing
between the filesystem and the device. So when the USB stick gets
pulled, from the dm-multipath side it looks like the last I/O path has
been pulled, and it role-plays accordingly (with some kind of
intelligence where it holds dirty buffers for some reasonable amount
of time --- where reasonable is not easy to define) and then when
someone re-inserts a USB stick, userspace will have to figure out that
it was the same filesystem, and that it apparently hasn't been
tampered with, cross its fingers, and then associate the (possibly
different USB device) with the dm-multipath device.
If we have a super-bright student who needs humbling, it might make
for an interesting GSOC project. :-)
- Ted
next prev parent reply other threads:[~2008-05-26 17:51 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 16:19 Top 10 bugs/warnings for the week of March 23rd, 2008 Arjan van de Ven
2008-05-23 16:23 ` Top 10 bugs/warnings for the week of May " Arjan van de Ven
2008-05-23 16:42 ` Top 10 bugs/warnings for the week of March " Linus Torvalds
2008-05-23 17:35 ` Arjan van de Ven
2008-05-23 19:31 ` Alan Cox
2008-05-24 0:15 ` Chris Wright
2008-05-24 5:07 ` Arjan van de Ven
2008-05-26 9:36 ` Ingo Molnar
2008-05-24 5:32 ` Greg KH
2008-05-24 22:23 ` Jan Kara
2008-05-24 22:30 ` Arjan van de Ven
2008-05-24 22:45 ` Theodore Tso
2008-05-25 11:58 ` Stefan Richter
2008-05-26 9:39 ` Ingo Molnar
2008-05-26 10:16 ` Theodore Tso
2008-05-26 10:48 ` Ingo Molnar
2008-05-26 16:20 ` Jan Kara
2008-05-26 16:48 ` Ingo Molnar
2008-05-26 17:01 ` Theodore Tso
2008-05-26 17:09 ` Oliver Neukum
2008-05-26 17:28 ` Bart Van Assche
2008-05-26 17:38 ` Jan Kara
2008-05-26 17:50 ` Theodore Tso [this message]
2008-05-26 18:23 ` Ingo Molnar
2008-05-27 6:12 ` Oliver Neukum
2008-05-27 11:41 ` Pavel Machek
2008-05-27 3:49 ` Greg KH
2008-05-27 11:40 ` Pavel Machek
2008-05-26 14:52 ` Stefan Richter
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=20080526175039.GC11330@mit.edu \
--to=tytso@mit.edu \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=bart.vanassche@gmail.com \
--cc=greg@kroah.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oliver@neukum.org \
--cc=torvalds@linux-foundation.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