LWN.net Logo

In Brief

By Jonathan Corbet
July 29, 2009
FAT timestamps. The FAT filesystem has a number of deficiencies. The fact that it cannot record time stamps for the root directory of a filesystem is probably not at the top of most peoples' lists, but Jorg Schummer has put together a patch to provide those time stamps anyway. The patch is a hack which stores the time stamp information in the FAT volume label, essentially hiding it from any system which doesn't know to look for it. This is not a new scheme; Mac OS X does the same thing. There does not seem to be a great clamor for this feature, but it is optional, the implementation is straightforward, and it's off by default. So there is little reason to leave it out either.

Remapping ext2/3 UIDs. Another failing of FAT is its inability to associate user or group ownership information with files. One would not normally want to port this "feature" to more complete filesystems, but Ludwig Nussel has noted a problem: a user moving an ext3 filesystem from one system to another will have problems accessing the files if said user's accounts have different user IDs on the two boxes. The solution is to add a uid= mount option to ext2 and ext3; the filesystem will then map between the given user ID (on the running system) and zero (on the filesystem).

There doesn't seem to be a great clamor for this feature either; the use of ext3 on filesystems moved between machines is probably relatively rare. Still, Andreas Dilger indicated that the feature might have its uses, but that some changes would be welcome. The ability to create root-owned setuid files needed to go away, and it would be nice to have a more general "remap UID1 to UID2" capability instead of just mapping to and from the root UID. Andreas also requested an ext4 version of the patch.

Fanotify. Eric Paris has posted a description of the new fanotify API for comments, noting that real patches will follow soon. That API has changed considerably since it was covered here at the beginning of July; the strange use of getsockopt() to get notifications is no more. Instead, a relatively normal socket is created, with read() being used to read notification events. There were a number of comments and suggestions, but the consensus seems to be that things are headed in the right direction.

ABUSE. We have FUSE, which allows the implementation of filesystems in user space, and CUSE, which does the same for char devices. So why not do the same thing for block devices? With Zachary Amsden's ABUSE patch, that now becomes possible. Zachary says: "This device is not about performance, is it about extending the boundaries of the kernel to the almost improbable." The code commentary notes that the feature can be "incredibly useful," but it's not clear what use case is being targeted at the moment.

ABUSE is highly unlikely to be merged, for the simple reason that much of what it does is already doable with the network block device (NBD) driver. Zachary plans to move to NBD for whatever purpose he has in mind. That purpose, apparently, makes it necessary to have access to partitions, which is why FUSE cannot be used.

The partitions topic led to a small side discussion, where Alan Cox suggested that partition support should be removed from the kernel altogether. Instead, the device mapper should be used to implement partitions. There are a lot of advantages - mostly administrative flexibility - which come from the use of the device mapper, but there are users, Linus included, who are not interested in requiring its use. So the kernel's partition code will not be going anywhere anytime soon.

A new book on the way. Man pages maintainer Michael Kerrisk, while writing about a recent release, noted that he is well along in the writing of a new book which extensively documents the Linux kernel's user-space API. It will not be light reading; it looks to end up at about 1500 pages. For the curious, Michael has posted a general description of the book and the table of contents. Publication is expected sometime in the first half of 2010.


(Log in to post comments)

In Brief

Posted Jul 30, 2009 5:54 UTC (Thu) by bronson (subscriber, #4806) [Link]

Remapping ext2/3 UIDs: this seems a little strange to me. On small systems, chmod -R works great (feed it with a find -owner if you're paranoid). And on big systems, it's really REALLY worth keeping your passwd files in sync.

What's the intent behind this feature? ext4 on usb flash drives?

In Brief

Posted Jul 30, 2009 6:56 UTC (Thu) by eru (subscriber, #2753) [Link]

What's the intent behind this feature? ext4 on usb flash drives?

Yes, and why not? It makes even more sense with portable USB hard drives. Just the other day saw a 1000Gb one advertised for 79 euros. ext3 or ext4 is definitely better for it than VFAT.

In Brief

Posted Aug 3, 2009 21:48 UTC (Mon) by Velmont (guest, #46433) [Link]

This is *SO* needed. I've been bitten by this oh-so-many times.

Why is VFAT the only usable file system for flash drives that I carry aronud to other Linux-systems? It's quite stupid if I might say so. :-)

Yes, yes, yes to this feature. It's really needed.

Remapping UIDs: ext only?

Posted Aug 12, 2009 14:49 UTC (Wed) by sethml (subscriber, #8471) [Link]

What I don't understand is why this would be a feature for ext filesystems only, rather than a
general VFS feature, applicable to any filesystems. I'd have certainly found it very useful for
NFS mounts in the past, since with NFS you often really have no control over the server-side
UIDs. (In my case, NFS-mounting a crappy NAS box which had some user UIDs conflicting
with standard Debian role accounts.)

re: Remapping ext2/3 UIDs

Posted Jul 30, 2009 6:02 UTC (Thu) by eru (subscriber, #2753) [Link]

Something like this really is needed, if one wants to replace the use of the famously patent-encumbered VFAT with a free alternative in removable media! For these, the UID should really be completely ignorable: When reading, the "uid=" option should remap everything to the given UID, not just files with zero UID. When writing, the UID on the media should probably be set to nobody (99), not root.

re: Remapping ext2/3 UIDs

Posted Jul 30, 2009 7:01 UTC (Thu) by tstover (subscriber, #56283) [Link]

damn straight

re: Remapping ext2/3 UIDs

Posted Jul 30, 2009 8:36 UTC (Thu) by mp (subscriber, #5615) [Link]

You certainly meant to write "nobody (65534), not root", didn't you?

If it's not root, configuration to allow for distro differences is necessary. Apparently the newest version of this patch allows it.

re: Remapping ext2/3 UIDs

Posted Jul 30, 2009 9:39 UTC (Thu) by eru (subscriber, #2753) [Link]

On the CentOS (RHEL clone) system I wrote this, "nobody" is 99, and 65534 is "nfsnobody". Actually that UID would be irrelevant, as long as it is unlikely to be a real user, or a system account (other than a "nobody"). Is there really no standard "nobody" number?

re: Remapping ext2/3 UIDs

Posted Jul 30, 2009 10:56 UTC (Thu) by NAR (subscriber, #1313) [Link]

It doesn't really matter, if there is a standard for system users, if nobody cares. On a SuSE system nobody is 65534 in group 65535, while on a Solaris nobody is 60001 in group 60001. On Ubuntu nobody is 65534 in group 65534. I have no other OSes nearby to check.

re: Remapping ext2/3 UIDs

Posted Jul 31, 2009 2:18 UTC (Fri) by njs (guest, #40338) [Link]

> When writing, the UID on the media should probably be set to nobody (99)

My understanding of 'nobody' is that it's what you use to run processes when they aren't supposed to have any permissions. Giving those processes read/write access to whole filesystems seems to defeat that purpose.

Better would be to make a new dedicated account for this purpose, and get LANANA to standardize the name and UID.

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds