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
Here are the current fcntls XFS supports:
F_DIOINFO # return info for apps to handle Direct I/O (no buffer cache).
F_FSGETXATTR # get a bigger stat structure with extended attr info.
F_FSGETXATTRA # same as previous, but different parms.
F_FSSETXATTR # set some extended attribute parameters.
F_GETBMAP # get the extents of a file.
F_GETBMAPA # same as F_GETBMAP but different format.
F_GETBMAPX # same as F_GETBMAP but different format.
F_FSSETDM # Set DMI event mask and state (XFS only, today)
F_ALLOCSP # pre allocate disk space for a file
F_FREESP # free some pre allocated disk space.
F_RESVSP # same as ALLOCSP but different parms.
F_UNRESVSP # same as F_FREESP except different parms.
F_ALLOCSP64 # same as ALLOCSP but different parms.
F_FREESP64 # same as F_FREESP except different parms.
F_RESVSP64 # same as ALLOCSP but different parms
F_UNRESVSP64 # same as F_FREESP except different parms.
F_SETBIOSIZE # set preferred buffered I/O size
F_GETBIOSIZE # get preferred buffered I/O size
I think we want to add a few more like F_FATTR_SET, F_FATTR_GET,
F_FATTR_LIST, and F_FATTR_REMOVE to implement the extended attribute
capability XFS has. This allows processes to add more info to files
besides the data. Then again, we could add new system calls for
attr_set, attr_get, attr_remove, attr_list, hmmm.
I think for now we should just add the fcntl callout to sys_fcntl and
not add the new system calls.
If sys_fcntl doesn't understand the fcntl and the inode is not
a socket and the file has an op for an fcntl callout, invoke the callout.
If noone objects, we'll get a patch together for this.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
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