From owner-freebsd-current@FreeBSD.ORG Sun Jun 5 18:03:19 2005 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA05816A41C; Sun, 5 Jun 2005 18:03:19 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from sp.dominia.org (efnet-math.org [69.60.109.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 625FE43D1F; Sun, 5 Jun 2005 18:03:19 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.1.12] (63-170-138-118.cst-sg.blacksburg.ntc-com.net [63.170.138.118]) (authenticated bits=0) by sp.dominia.org (8.13.1/8.13.1) with ESMTP id j55I3HxG015548 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Sun, 5 Jun 2005 14:03:18 -0400 Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <82ACAD58-B179-44E2-852F-60F25C0BBBC1@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Suleiman Souhlal Date: Sun, 5 Jun 2005 14:03:10 -0400 To: current@FreeBSD.org X-Mailer: Apple Mail (2.730) Cc: fs@FreeBSD.org Subject: [PATCH] IFS: Inode FileSystem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2005 18:03:19 -0000 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@) 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@vt.edu The FreeBSD Project | ssouhlal@FreeBSD.org