Re: closefd: closes a file of any process

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Sat Jun 24 2000 - 06:17:29 EST


In <20000623232902.B30832@pcep-jamie.cern.ch> Jamie Lokier (lk@tantalophile.demon.co.uk) wrote:
> Tigran Aivazian wrote:
>> Then you come up with an idea of implementing a special
>> filesystem 'nullfs' where you shift the open file to, instead of closing
>> it. Any subsequent io on this fd gives EIO.

> Nice, because you still have the path from the dentry. So you might be
> able to forcibly unmount a filesystem (e.g. on a broken network file
> server) moving everything to nullfs. And then you might be able to
> mount a different fs in its place and use the paths from the dentries to
> convert the nullfs references back into real file references.

... on backup server ? Yeah, it can be usefull. In this case all operations
should return NOT IO error but "try again" (I'm not sure how applications
will react - perhaps better way is to freeze application and notify some
daemon).

> Just a thought, I'm not sure if it has any application.

Of course it has. From forcible umount of filesystem (with "try again" or
freezing with notification) is just one step to "proper handling" of
floppies (like in Windows: "insert floppy number 39BC-1102 in drive A" :-)

If you have way to mount filesystem back and have the same files in the same
state then you can unmount floppy before turning off motor and trying to mount
it when application is accessiong file (yet another variation of nullfs).
I'm not sure if all this trouble worth it though.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:04 EST