lkml.org 
[lkml]   [2000]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fcntl(2) and other file systems like XFS
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site