Re: mnotify: mixing nonotify & simple mount watching (Was: Re: [RFC/PATCH] Nonotify...)



On Wed, 2004-08-18 at 19:31, John McCutchan wrote:
> 
> > Another thing: Because you are an expert on kernel-vfs: Do you have an
> > idea how to solve this issue: How to get "umount -f" working with open
> > filedescriptors. Detaching the open fd's from the vfs somehow and
> > disabling them...
> 
> That is possible to do (Just look at how inotify handles unmount in
> generic_superblock_shutdown())., but that would break applications left, right
> and center. Apps aren't designed to handle files disappearing out
> from underneath them. I think a better way to handle that is to fix the apps.

The problem is that you can't fix the apps because they behave correctly
according to the POSIX standard. And POSIX is THE STANDARD for linux
desktop applications (for file operations). That will never ever change.
Therefore there is nothing wrong with apps cd'ing into a directory or
having open fd's (like the simple "tail" command line tool does). 

Considering that, the only way to fix this problem is to make "umount
-f" work in the kernel. Detaching filedescriptors and returning
read/write errors seems to be the only POSIX compatible way to deal with
this. Sad but true (i believe). It's kind of funny that the people who
wrote "supermount" were the only ones who realized that fact and found a
way to detach and terminate open filedescriptors.

So if you say "That is possible to do", it would be great if you could
investigate the possibility of doing that in kernel-vfs further. I think
it's really important, because there MUST be a way to get the system to
the state before mounting at any time. Otherwise the linux desktop &
removable devices will be handycapped forever...

Thanks,

Norbert






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