Re: fcntl(2) and other file systems like XFS

From: Jamie Lokier (lfs@tantalophile.demon.co.uk)
Date: Tue Mar 21 2000 - 11:07:22 EST


Stephen C. Tweedie wrote:
> Yes. In fact, it's worse than that: to perform either an ioctl or a
> fcntl, you need to have a file handle on the inode. But for device
> inodes, you cannot open the inode unless the device is present. This
> hits us already on ext2: you cannot, for example, do a "chattr +I
> /dev/*" to make all /dev inodes immutable, because most of the inodes
> present in that directory will not have valid devices (just how many
> people do you know who use every possible partition number of every
> possible scsi, ide, smart, mylex .... device?)

The very nice O_NONE idea would sort this out. O_NONE means you can
always open the file object, but you can't do much with it. For a
device, the device wouldn't get opened, but fstat() would return the
same device information as stat() returns.

Things like fchmod _are_ permitted though.

We could say that fs-specific ioctls (or fcntls if it goes that way) are
permitted on O_NONE file handles.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:33 EST