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

From: Ted Kline (jtk@sgi.com)
Date: Mon Mar 13 2000 - 23:58:06 EST


>
> Jim Mostek writes:
> >
> > I don't see a callout from sys_fcntl into a file system specific routine
> > (other than for file locking). There is a lock callout in
> > the file operations that can be invoked in fcntl_getlk/fcntl_setlk/...
> > (I'm looking in 2.3.42). But, this is different than file system specific
> > fcntls. There is a call to sock_fcntl if the inode is a socket. But, I
> > don't see a call for a file system specific fcntl in sys_fcntl..
> >
> > XFS has several fcntls for things like preallocating space. This is used
> > by some applications who want very large files. This let's a file system
> > allocate the space all at once.
> >
> > Has the issue of a file_operation callout for fcntl gone around before?
> > Anyone opposed to adding this? I don't think this belongs in the
> > inode_operations.
>
> As I understand it, Linux does do this sort of thing via ioctl(),
> not fcntl(). The logic is that fcntl() is for attributes of "file" objects.
>

pre-allocating space is very much a "file oriented" request.

The semantics (IRIX & Unicos) require an active/existing file handle (fd),
and an operation (fcntl) against that handle.

To me, an ioctl would be used for a filesystem-wide manipulation,
perhaps like growing the filesystem...

        -Ted

-
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 : Wed Mar 15 2000 - 21:00:28 EST