Re: THE LINUX REMOVABLE DEVICE PETITION



Supermount and Submount should "die" one day. Things like this should
be handled in userspace, not in-kernel.
I think exporting the number of open handles to a device in sysfs
(http://sourceforge.net/mailarchive/forum.php?thread_id=5005341&forum_id=40939)
would be great, and only needs a small kernel patch (I think). The
counter must be somewhere in the kernel, so why no export it? If it
reaches 0 -> we can safely umount (no fd's pointing to the device). If
it's not 0 -> device in use, or ghost fd's. Changes in this can be
easily monitored by libsysfs and HAL.

Greetings, Nicolas

On Tue, 29 Jun 2004 00:16:42 +0200, nf <nf2 scheinwelt at> wrote:
> 
> On Thu, 2004-06-24 at 08:18, Ikke wrote:
> > > Gnome-VFS is the wrong place for this, because the special umount
> > > command which suspends monitoring needs to become standard for all
> > > desktops. The lightweight ones also. There should be no
> > > GNOME-dependencies. It needs to be tiny and simple - to get widely
> > > adopted.
> > Thats what I think too.
> >
> > > FAM really needs a control and status API.
> > >
> > > Btw, what do you think of a gerneric "libdirmonitoring"-API, which sits
> > > on top of FAM and provides the "smumount" (Suspend monitoring and
> > > umount) function. Such a generic layer could also help to replace FAM
> > > lateron.
> > That's +- what we tried to achieve in libProcNotification I guess. At
> > a certain level.
> 
> Yes. But FAM needs some changes too... :-(
> 
> When you call FAMSuspendMonitor(), fam does not close the filedescriptor
> used for monitoring via dnotify. Therefore umount stays blocked. So a
> redesign of fam's dnotify bridge would be necessary.
> 
> For "smumount" special control functions
> FAMSuspendAllMonitors() and FAMResumeAllMonitors() would be required.
> The problem is, that any user could invoke them.
> 
> I wonder if it wouldn't be easier to make something like "nonotify" (or
> inotify) work, but "nonotify" might be conflicting with "supermount" and
> "submount". And i still don't know how this special stat() system call
> for nonotify can be put into practice.
> 
> As for the petition in general: I didn't get a clear and convincing
> response yet, which direction linux should go: (1) To fix fam & dnotify
> & umount -f or (2) use "proxy-filesystems" which always stay mounted
> like "supermount" and "submount". Anyway - maybe i'm overestimating the
> importance of this problem...
> 
> Norbert
> 
> 


-- 
Ivman dev - http://ivman.sourceforge.net
Blogging @ http://blog.eikke.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]