Subject: Re: fcntl changes once again.
To: Roger Brooks <>
From: Bill Studenmund <>
List: tech-kern
Date: 07/13/1999 15:12:03
On Tue, 13 Jul 1999, Roger Brooks wrote:

> On Tue, 13 Jul 1999, Bill Studenmund wrote:
> Wouldn't it be better to have something like:
> 	fcntl( fd, F_SETFSOPT, (void *) &fsopts )
> The details of exactly what would be in fsopts are a bit vague, but it could
> be something like:
> 	struct fsopts {
> 	int	f_fstype;
> 	int	f_option;
> 	int	f_value;
> 	}
> The parameter could be passed down the vfs layers (like a streams ioctl) until
> it reached a layer of the right fstype.  Setting f_fstype to -1 might be used
> to let every layer have a look at it.  If you are going to have more than one
> layer of the same filesystem type, you'd probably want another field
> (f_fsinstance) to say which of the layers of f_fstype you wanted to modify.
> You'd probably also want an F_GETFSOPT (although this could obviously only
> return a value from one layer per call), and maybe an F_GETFSTYPE which
> would let you sound the layers one at a time to find out what they are.

The big problem with this proposal I see is that we need to pass in and
out structs. So first off the value needs to be a void *. We'd still need
to pass in a size and in/out/void flags would help. I'd suggest encoding
them into the command (you implicitly make sure that the command
gets/writes the right size struct).

In ioctl parlance, we have 14 "void" calls, 2 write ones, and 4 read ones
in our in-house system. So the void * bit needs to be there.

Take care,