[lkml]   [2000]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: fcntl(2) and other file systems like XFS

    On Tue, Mar 21, 2000 at 04:36:10PM +0100, Jamie Lokier wrote:
    > > I just too a quick look, and it looks like ioctl can accomplish both
    > > just with a little care. In particular you install some kind of
    > > wrapper for the inode operations after calling init_special_inode...
    > I din't think that's a good idea.
    > What happens when you have /dev on an XFS filesystem, you open a device
    > and call a device-specific ioctl()... but it collides with an XFS ioctl
    > number.
    > Something will go wrong, won't it?

    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?)

    Linus rejected my last patch to allow fs-specific calls to go directly
    to the fs by inode rather than by file handle on the grounds that it
    was too generic --- he hated the ioctl-style of overloaded interface.
    With decent APIs for specific functionality, we should be able to get
    something in place, however.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:57    [W:0.018 / U:44.800 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site