NT_STATUS_INVALID_HANDLE during file open with vfs_glusterfs

Anoop C S anoopcs at cryptolab.net
Wed Aug 21 03:13:53 UTC 2019

On Mon, 2019-08-05 at 19:52 +0530, Anoop C S via samba-technical wrote:
> Hi all,
> The following commit changed the way in which O_NONBLOCK is
> added/removed from file status flags during open.
> https://git.samba.org/?p=samba.git;a=commit;h=ef582ffcf3a220b73f678d9bce0fd37800f76c54
> 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.

Based on follow-up offline discussions proposing the attached patch for
review. Since this is not supposed to be land in release branches I
hope we are good with not adding the BUG in commit message.


Anoop C S. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vfs_glusterfs-Return-fake-fd-from-pipe-during-open.patch
Type: text/x-patch
Size: 2055 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190821/94b8f313/0001-vfs_glusterfs-Return-fake-fd-from-pipe-during-open.bin>

More information about the samba-technical mailing list