diff options
author | adrian <adrian@FreeBSD.org> | 2000-10-14 03:02:30 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2000-10-14 03:02:30 +0000 |
commit | 0458054c4e405cc6f262b0fb171dc3d049bc7513 (patch) | |
tree | 5d8132a94f833d46795e30aa5296a893b2e5637c /sys/conf/files | |
parent | ee143d47ad6c41a3590bdb5ed28c7bd5bf6ffff8 (diff) | |
download | FreeBSD-src-0458054c4e405cc6f262b0fb171dc3d049bc7513.zip FreeBSD-src-0458054c4e405cc6f262b0fb171dc3d049bc7513.tar.gz |
Initial commit of IFS - a inode-namespaced FFS. Here is a short
description:
How it works:
--
Basically ifs is a copy of ffs, overriding some vfs/vnops. (Yes, hack.)
I didn't see the need in duplicating all of sys/ufs/ffs to get this
off the ground.
File creation is done through a special file - 'newfile' . When newfile
is called, the system allocates and returns an inode. Note that newfile
is done in a cloning fashion:
fd = open("newfile", O_CREAT|O_RDWR, 0644);
fstat(fd, &st);
printf("new file is %d\n", (int)st.st_ino);
Once you have created a file, you can open() and unlink() it by its returned
inode number retrieved from the stat call, ie:
fd = open("5", O_RDWR);
The creation permissions depend entirely if you have write access to the
root directory of the filesystem.
To get the list of currently allocated inodes, VOP_READDIR has been added
which returns a directory listing of those currently allocated.
--
What this entails:
* patching conf/files and conf/options to include IFS as a new compile
option (and since ifs depends upon FFS, include the FFS routines)
* An entry in i386/conf/NOTES indicating IFS exists and where to go for
an explanation
* Unstaticize a couple of routines in src/sys/ufs/ffs/ which the IFS
routines require (ffs_mount() and ffs_reload())
* a new bunch of routines in src/sys/ufs/ifs/ which implement the IFS
routines. IFS replaces some of the vfsops, and a handful of vnops -
most notably are VFS_VGET(), VOP_LOOKUP(), VOP_UNLINK() and VOP_READDIR().
Any other directory operation is marked as invalid.
What this results in:
* an IFS partition's create permissions are controlled by the perm/ownership of
the root mount point, just like a normal directory
* Each inode has perm and ownership too
* IFS does *NOT* mean an FFS partition can be opened per inode. This is a
completely seperate filesystem here
* Softupdates doesn't work with IFS, and really I don't think it needs it.
Besides, fsck's are FAST. (Try it :-)
* Inodes 0 and 1 aren't allocatable because they are special (dump/swap IIRC).
Inode 2 isn't allocatable since UFS/FFS locks all inodes in the system against
this particular inode, and unravelling THAT code isn't trivial. Therefore,
useful inodes start at 3.
Enjoy, and feedback is definitely appreciated!
Diffstat (limited to 'sys/conf/files')
-rw-r--r-- | sys/conf/files | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/conf/files b/sys/conf/files index 9aab791..cb32e8d 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -973,22 +973,30 @@ posix4/ksched.c optional _kposix_priority_scheduling posix4/p1003_1b.c standard posix4/posix4_mib.c standard ufs/ffs/ffs_alloc.c optional ffs +ufs/ffs/ffs_alloc.c optional ifs ufs/ffs/ffs_alloc.c optional mfs ufs/ffs/ffs_balloc.c optional ffs +ufs/ffs/ffs_balloc.c optional ifs ufs/ffs/ffs_balloc.c optional mfs ufs/ffs/ffs_inode.c optional ffs +ufs/ffs/ffs_inode.c optional ifs ufs/ffs/ffs_inode.c optional mfs ufs/ffs/ffs_snapshot.c optional ffs +ufs/ffs/ffs_snapshot.c optional ifs ufs/ffs/ffs_snapshot.c optional mfs ufs/ffs/ffs_softdep.c optional softupdates ufs/ffs/ffs_softdep_stub.c standard ufs/ffs/ffs_subr.c optional ffs +ufs/ffs/ffs_subr.c optional ifs ufs/ffs/ffs_subr.c optional mfs ufs/ffs/ffs_tables.c optional ffs +ufs/ffs/ffs_tables.c optional ifs ufs/ffs/ffs_tables.c optional mfs ufs/ffs/ffs_vfsops.c optional ffs +ufs/ffs/ffs_vfsops.c optional ifs ufs/ffs/ffs_vfsops.c optional mfs ufs/ffs/ffs_vnops.c optional ffs +ufs/ffs/ffs_vnops.c optional ifs ufs/ffs/ffs_vnops.c optional mfs ufs/mfs/mfs_vfsops.c optional mfs ufs/mfs/mfs_vnops.c optional mfs @@ -997,6 +1005,10 @@ ufs/ufs/ufs_extattr.c standard ufs/ufs/ufs_ihash.c standard ufs/ufs/ufs_inode.c standard ufs/ufs/ufs_lookup.c standard +ufs/ifs/ifs_lookup.c optional ifs +ufs/ifs/ifs_vfsops.c optional ifs +ufs/ifs/ifs_vnops.c optional ifs +ufs/ifs/ifs_subr.c optional ifs ufs/ufs/ufs_quota.c standard ufs/ufs/ufs_vfsops.c standard ufs/ufs/ufs_vnops.c standard |