Bug 1187372 - Samba "use sendfile" is incompatible with GlusterFS libgfapi vfs_glusterfs.
Summary: Samba "use sendfile" is incompatible with GlusterFS libgfapi vfs_glusterfs.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anoop C S
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-29 22:05 UTC by Jeff Byers
Modified: 2017-01-11 13:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-11 13:58:34 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jeff Byers 2015-01-29 22:05:16 UTC
Samba "use sendfile" is incompatible with GlusterFS libgfapi vfs_glusterfs.

When using Windows 2012R2 to copy a large file from one Samba
shared GlusterFS volume to another, when the GlusterFS
libgfapi vfs_glusterfs interface is used, and the Samba "use
sendfile" option is enabled, the copy will fail, and the
'smbd' server process will die:

  [2015/01/29 11:43:20.739455,  0, pid=11700]
  ../source3/smbd/smb2_read.c:225(smb2_sendfile_send_data)
  smb2_sendfile_send_data: sendfile failed for file
  isos/CD8.0.1.6.iso (Operation not supported). Terminating

However, the same works fine when either the "use sendfile"
option is disabled, or when it is enabled and GlusterFS FUSE
mounts are used instead of vfs_glusterfs.

This was while using versions Gluster 3.6.2, and Samba 4.1.16.

It is unclear if the vfs_glusterfs interface can even support
sendfile(), but ideally, if not, it should know this, and the
'smbd' process wouldn't die.

Comment 1 rjoseph 2016-08-23 13:03:34 UTC
GlusterFS-3.6 is nearing its End-Of-Life, only important security bugs still make a chance on getting fixed. Moving this to the mainline 'version'

Comment 2 Niels de Vos 2017-01-09 13:44:39 UTC
Any plans here? I guess this needs a change to the samba/vfs_glusterfs module and possibly not the glusterfs/libgfapi sources?

Comment 3 Anoop C S 2017-01-11 12:06:17 UTC
VFS module for GlusterFS in Samba does not support sendfile() call.

I was able to reproduce the issue on a local setup and have fixed it in Samba[1] in such a way that a fallback to normal copy is made possible in case 'use sendfile' is accidentally enabled for a particular share for which it is not supported, irrespective of whether is GlusterFS or any other backend file system.

[1] https://git.samba.org/?p=samba.git;a=commit;h=3a864fc952edaa96d2ee20254a3e9c90d29fe28c

Comment 4 Niels de Vos 2017-01-11 13:58:34 UTC
Closing this bug as it does not require a change to the GlusterFS sources. Please check the next Samba releases for their fix.


Note You need to log in before you can comment on or make changes to this bug.