[Gluster-devel] GlusterFS API to manipulate open file descriptor - glfs_fcntl?

Kaleb Keithley kkeithle at redhat.com
Tue Oct 15 13:08:47 UTC 2019


On Tue, Oct 15, 2019 at 6:37 AM Niels de Vos <ndevos at redhat.com> wrote:

>
> The fcntl() operations are split when FUSE is used. There in direct
> fcntl() call that FUSE passes on, instead it calls lock() and similar
> interfaces.


Sorry, I can't parse this. I think you mean "There is no (direct) fcntl(2)
fop in FUSE."


> I think you refer to F_GETFD and F_SETFD commands for
>

F_GETFL and F_SETFL !


> fcntl(). For all I can see, these do not exist in FUSE, and have not
> been added to gfapi either.


Am I reading socket_connect() in rpc/rpc-transport/socket/src/socket.c
correctly? It looks like we already always set O_NONBLOCK on sockets.


> Not sure if the single supported flag
> FD_CLOEXEC can have a benefit on Gluster, as glfs_fini() is expected to
> cleanup everything that gfapi allocates.
>

That presumes that the implementation always calls glfs_fini() before a
call to exec(2). I guess it might be bug if it didn't.  AFAIK ganesha
doesn't ever call exec(2).  Samba's client model is different. And it would
be wrong to pass it over the wire to the server.

--

Kaleb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20191015/4f0400e2/attachment.html>


More information about the Gluster-devel mailing list