Messages in this thread | | | Subject | Re: fcntl(2) and other file systems like XFS | Date | Thu, 16 Mar 2000 09:03:10 +0000 | From | David Howells <> |
| |
I had a look at the Solaris manual page for fcntl, and I saw that at least one of those supported by XFS is also supported by Solaris (F_FREESP). I also looked at the Solaris manual page for ioctl, and they seem to think that the fcntl call should be used for manipulating the object viewed as a filesystem file, and ioctl manipulating it as an I/O stream.
Since fcntl can take multiple arguments, would something like the following be a reasonable idea?:
fcntl(fd,F_FSCTL,"xfs",...);
Thus F_FSCTL would be a "file-system specific control function", the third argument would be the name of the filesystem it's intended for, and the extra arguments say what the control function actually is.
Or, if passing extra parameters like this is too much trouble for the kernel syscall interface, then the following may be a reasonable alternative:
struct fsctl { const char *f_fsname; int f_operation; void *f_data; };
struct fsctl f = { "xfs", XFS_DO_SOMETHING, &data };
fcntl(fs,F_FSCTL,&f);
What do you think? David Howells
- 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/
| |