[LWN Logo]

 Main page
 On the Desktop
 Linux in the news
 Linux History
All in one big page

See also: last week's Kernel page.

Kernel development

The current kernel release is still 2.4.2. Linus has resumed work toward 2.4.3; his current prepatch release is 2.4.3pre3. Alan Cox, meanwhile, has kept up his pace and reached 2.4.2ac14. A reader asked us to figure out how much of the "ac" patches have made it into Linus's kernel. Unfortunately, there is no easy answer to that question. Linus's changelogs just say "Alan Cox: continued merging". The only person who actually knows the answer, in all likelihood, is Alan, and he does not have the time to make a list.

No new 2.2.19 prepatches have been released in the past week.

SnapFS alpha release. Peter Braam and his colleagues at Mountain View Data have announced the alpha release of SnapFS, a new filesystem add-on. As an alpha release, it's not something that you are likely to want to put on that big departmental server. It has some interesting features, though, that make it definitely worth a look.

Essentially, SnapFS enables a filesystem to preserve its history. One could compare it to the old VMS file versioning scheme, but SnapFS is far more flexible than that. It can preserve the state of an entire filesystem at any given time; it can also be set up to preserve every revision that is ever made of every file on the system. That latter mode, presumably, is recommended only for users with very large disks.

To many, SnapFS may just seem like a way of filling up excess disk space. But, in fact, there are some truly useful applications for such a filesystem:

  • Backups. SnapFS can be used to stabilize a version of the filesystem, which can then be written to tape. There is no need to (1) kick the users off the system to get a clean backup, or (2) run backups on a live system and just hope everything comes out OK.

  • System administration work. Imagine freezing the filesystem state before that next big operating system upgrade. If it doesn't work out, one command brings back the previous state of affairs.

  • Fat-fingered users. Most system administrators learn early on that the most frequent use of backups is not recovery from disk disasters; [SnapFS diagram] it's restoring files that some user (usually the same user) destroyed. With snapshots, that process is much easier.
SnapFS works by placing itself between the Linux virtual filesystem (VFS) and any of a number of underlying filesystems - though only XFS and ext3 are implemented in the alpha version. The diagram on the right (stolen from a white paper on the Mountain View Data SnapFS page) shows how the pieces fit together. The supporting filesystem must be of the journaling variety, since SnapFS relies on the atomic updates that journaling filesystems provide. The filesystem must also support extended attributes, essentially the hanging of additional metadata onto files. Thus, most users will need to apply both the ext3 and extended attribute patches (of which there is a new release - see below) to be able to run SnapFS.

Whenever a file is to be modified, and its contents must be preserved in a snapshot, SnapFS creates a new inode in the filesystem to hold the snapshot version. An extended attribute which points to the snapshot inode is then attached to the visible version of the file. The actual blocks of the file are shared between the current file and the snapshot until they are changed; at that point the SnapFS "copy on write" mechanism makes copies of the affected blocks. Snapshots are thus relatively efficient in their use of storage, especially in situations where only parts of files are changed. For example, a snapshot of that huge web server log file, which is only appended to, does not duplicate the log entries that are shared between the current and archived versions.

This mechanism also makes the creation of snapshots very fast. Since no data is copied at that time, making a snapshot is really just a matter of filling in a table entry.

A set of tools is provided with SnapFS to handle the management of SnapFS filesystems, performing rollbacks to older versions, etc. Mountain View Data's revenue model is starting to come into focus, though - a number of additional management tools will be proprietary. For example, there will be utilities to stabilize and quiesce Oracle and MySQL databases for snapshots. The basic SnapFS code, however, is licensed under the GPL.

What should the kernel do with DOS-formatted scripts? A user recently turned up a little problem. Imagine that you have a perl script that starts with the usual incantation:

You would expect the kernel to be able to run the perl interpreter when the script is invoked. But now imagine that the script is in DOS format - each line ends with a carriage-return and a line feed (\r\n) rather than just a line feed (\n), which has been the Unix standard forever. The kernel, in this case, will see the carriage return as part of the interpreter name; as a result, the user gets a "no such file or directory" complaint from the shell.

This user, Ivo Timmermans, included a patch that would make the kernel strip out the carriage return in scripts like this. The initial response from Alan Cox was not particularly receptive: "Fix the script. The kernel expects a specific format." That approach makes sense to some - why should the kernel go out of its way to support scripts that are not in the specified format?

It was subsequently pointed out, however, that the kernel will happily strip away other sorts of trailing white space, such as space characters and tabs. Should not carriage returns, which are generally recognized to be white space as well, be stripped too? Good question, with no answer from those who would eventually have to accept the patch. For now, "fix the script" is the order of the day.

Other patches and updates released this week include:

  • Andreas Gruenbacher has released version 0.7.8 of the access control list and extended attribute patch.

  • The "final" version of the aacraid driver, which "supports the on-board RAID controllers on the Dell PowerEdge 2400, 2450, and 4400 servers, the add-in 4-channel PERC2 card, and the HP NetRAID-4M card," has been released by Matt Domsch.

  • Brad Douglas has announced that the linux-fbdev mailing list will be making the pilgrimage over to SourceForge.

  • Christian Worm Mortensen released a new version of the "WRR" scheduler, which provides control over the use of an Internet connection shared by several systems. The message doesn't contain the URL for the code, however; if you're interested, the WRR page is over here.

  • Zach Brown has released a massively updated maestro sound card driver. It looks like it has a number of good fixes, but it's only for the 2.2.18 kernel, currently.

  • Steve Best has released JFS beta 2 release 0.2.0, the latest version of IBM's journaling filesystem.

Section Editor: Jonathan Corbet

March 8, 2001

For other kernel news, see:

Other resources:


Next: Distributions

Eklektix, Inc. Linux powered! Copyright © 2001 Eklektix, Inc., all rights reserved
Linux ® is a registered trademark of Linus Torvalds