linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bert hubert <ahu@ds9a.nl>
To: Oliver Neukum <oliver@neukum.org>
Cc: James Bruce <bruce@andrew.cmu.edu>, Greg KH <greg@kroah.com>,
	linux-hotplug-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [2.6.9-rc4] USB && mass-storage && disconnect broken semantics
Date: Tue, 12 Oct 2004 10:46:32 +0000	[thread overview]
Message-ID: <20041012104632.GA32663@outpost.ds9a.nl> (raw)
In-Reply-To: <200410121224.44910.oliver@neukum.org>

On Tue, Oct 12, 2004 at 12:24:44PM +0200, Oliver Neukum wrote:

> Devices break. You have to cope with devices going away suddenly.
> You are not required to ensure data integrity in all cases, but the system
> must not suffer. To allow that you must be able to get rid of the mounts
> even if users do not cooperate. 

Well, in retrospect, the kernel appears to offer the following semantics,
perhaps unintentionally:

	When a device goes away for any reason, but there are mounts that
	refer to it, the device nominally stays around and an umount will
	always succeed, removing the vestiges of the device with it.

This would in fact allow something in userspace listening to hotplug events
to umount on a disconnect event from USB. Except that I'm not sure if the
semantics above are guaranteed - they may just be an accident.

Things get more complicated if we have logical volumes or raid partitions
which ultimately depend on a device that is removed. In this case, userspace
should be aware of all dependencies in order to know which mountpoints to
umount. This might even include loopback mounts.

The kernel knows the dependencies implicitly and might be in a better
position to know what is invalidated by a disconnect, and which devices
disappear because of dependencies on it.

I'm hoping either Greg or Al will chime in - it appears as if part of the
infrastructure is there, but not quite developed.

Thanks.

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  reply	other threads:[~2004-10-12 10:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 12:07 [2.6.9-rc4] USB && mass-storage && disconnect broken semantics bert hubert
2004-10-11 15:37 ` Kay Sievers
2004-10-11 16:07   ` David Brownell
2004-10-12  5:54   ` bert hubert
2004-10-12  8:22 ` James Bruce
2004-10-12 10:24   ` Oliver Neukum
2004-10-12 10:46     ` bert hubert [this message]
2004-10-13 19:01     ` Linas Vepstas

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=20041012104632.GA32663@outpost.ds9a.nl \
    --to=ahu@ds9a.nl \
    --cc=bruce@andrew.cmu.edu \
    --cc=greg@kroah.com \
    --cc=linux-hotplug-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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).