Re: NWFS Salvagable File System Name Collisions/No FS IOCTL Problem

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 24 Nov 1999 00:03:01 +0000 (GMT)


> set. Instead, NetWare changes the flags for the namespace chain and
> OR's in a 0x30 into the dos->Flags field in the directory file. These

Ok.

> 1. NO IOCTLS to the File System -- this means that in order for the
> file salvage utility to work, we again need an IOCTL into the fs driver,
> or users will have to dismount the volumes before they will be able to
> salvage files. Netware lets you do it real time from any client so if a
> user trashes files, they can be quickly recovered. I have written the
> tools to do the salvage, but there's no way at present to talk to the FS
> driver properly so we have an alternate proposal.

You can do ioctls into a mounted file system, but not into an unmounted one.
So when the fs is live you can sanely open an inode (eg the directory in
question) and ask for delete file lists and do operations via ioctl.

Take a look at fs/ext2/ioctl.c for an example. When you are doing things
with a mounted file system you can get handles to it and thus manipulate it
this way. Also because you have a handle on it to do the ioctl nobody can
sneak off and unload it on you.

> Linux seems OK with this, and seems to work fine, but it's hard for
> users to pick a particulat file, so we are adding ".del#" to the end of
> file so folks can pick the ones they want to recover.

Netapps implement this sort of thing (actually more sophisticatedly) with
directories typicalled named things like .1/ .2/ .3/ for previous versions
of files. .1/ .2/ .3 the directories magically always exist so you cant go
creating them and having clashes.

Alan

-
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/