Re: [PATCH] IFS: Inode FileSystem

From: Scott Long <scottl_at_samsco.org>
Date: Sun, 05 Jun 2005 22:53:35 -0600
Maxim Sobolev wrote:
> Are there any real users of this FS? If my memory serves,
> Adrian's plan was to add IFS support into the squid. I
> wonder if it had happened and whether or not it actually
> provides any real performance benefit.
> 
> -Maxim
> 

IFS is centered around the observation that most apps already keep a
metamapping of 'filename ABC = data XYZ', where the filename is really
nothing more than a unique identifier for the data.  Expressive
filenames and file hierachies are useful for humans, but matter
little to computers.  The name "squid/cache/a/b/abc" has as much
meaning to a computer as the name "12345" (which might be the inode
number of the file).  So taking this into account, you can strip
out all the overhead of recursive namei lookups, directory data reads,
directory hashing, etc, and just use the inode number directly as the
identifier for inodes.  Looking up by inode is a O(1) operation
consisting of merely using the number to index into a inode array in a
particular cylinder group.  It's a huge win for CPU overhead in the
filesystem, especially when we start talking about increasing the size
of m_links field and possibly going to 64-bit inode numbers.

Squid is an ideal test vehicle for this, and I hope that the rumored
patches for it can re-materialize.  However, it's a circular argument
to say that the presence of IFS should rely on IFS apps being present;
I'm very glad that Suleiman is working on this, and I hope it reaps
some benefit.

Scott


> On Sun, Jun 05, 2005 at 02:03:10PM -0400, Suleiman Souhlal wrote:
> 
>>Hi,
>>
>>IFS is basically FFS, minus the namespace. Files are referenced by  
>>their inode number, thus making file lookup very fast. This is very  
>>useful for things that keep the file names in their own database  
>>anyway, such as web or news caches.
>>
>>Files are created by opening the "newfile" file:
>>
>>    fd = open("newfile", O_CREAT|O_RDWR, 0644);
>>    fstat(fd, &st);
>>    printf("new file is %d\n", (int)st.st_ino);
>>
>>Once a file has been created it is possible to accessing by just  
>>opening it the file named after the inode number. For example:
>>
>>    fd = open("5", O_RDWR);
>>
>>This filesystem was imported back in the year 2000, by Adrian Chadd  
>>(adrian_at_) and removed in 2002, before the introduction of UFS2 in  
>>order not to slow down the development of UFS2.
>>
>>I have fixed it so that it is usable on -CURRENT. You can find the  
>>kernel bits at http://people.freebsd.org/~ssouhlal/testing/ 
>>ifs-20050605-2.diff and the userland bits at http:// 
>>people.freebsd.org/~ssouhlal/testing/ifs-20050605-userland-2.diff .
>>(You need to copy src/sbin/fsck_ffs to src/sbin/fsck_ifs and src/sbin/ 
>>mount_ufs to src/sbin/mount_ifs, before applying the userland patch).
>>
>>You can use the regular newfs(8) to create such a filesystem. You  
>>might also want to specify the -n option, so that the .snap directory  
>>is not created at newfs, since directories are useless, in IFS. If  
>>you don't you'll end up with a useless inode, which is not really a  
>>big deal.
>>Once the filesystem is created, you can mount it with mount_ifs.
>>
>>You can find additional comments in src/sys/ufs/ifs/README in the patch.
>>
>>Is anyone interested in seeing this committed?
>>
>>Bye,
>>--
>>Suleiman Souhlal     | ssouhlal_at_vt.edu
>>The FreeBSD Project  | ssouhlal_at_FreeBSD.org
>>
>>_______________________________________________
>>freebsd-current_at_freebsd.org mailing list
>>http://lists.freebsd.org/mailman/listinfo/freebsd-current
>>To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>>
>>
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Mon Jun 06 2005 - 02:55:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC