NT_STATUS_INVALID_HANDLE during file open with vfs_glusterfs

Anoop C S anoopcs at cryptolab.net
Mon Aug 5 14:22:37 UTC 2019

Hi all,

The following commit changed the way in which O_NONBLOCK is
added/removed from file status flags during open.

smbd: Always open files with O_NONBLOCK

Since O_NONBLOCK is now internally getting added unconditionally,
storage backed by GlusterFS volumes using vfs_glusterfs produces
*Invalid file handle* error while opening files(I tested from Windows).
set_blocking() from open_file() is now being invoked due to the
presence of O_NONBLOCK flag and fails at fcntl() call operating on fsp-
>fh->fd which is obviously bad and returns EBADF.

Thus when open file descriptors are handled as fsp_extensions we may
have to rely on VFS itself to get the job done.

Anoop C S

More information about the samba-technical mailing list