Streams implementing VFS modules may implement streams in a way that the fsp will have the basefile open in the fsp fd, so lacking a distinct fd for the stream, kernel_flock will apply on the basefile which is wrong. VFS modules implementing kernel_flock should check whether the fsp refers to a stream and refrain from applying locks on it. Currently vfs_gpfs is the only one affected by this. On a GPFS cluster with "gpfs:sharemodes = yes" (which is the default), the issue can be trigger with smbtorture: $ ./bin/smbtorture -Uuser%pass //server/share --option=torture:share1=share smb2.streams smbtorture 4.3.0pre1-DEVELOPERBUILD Using seed 1430321196 time: 2015-04-29 17:26:36.298447 progress: 1 test: sharemodes time: 2015-04-29 17:26:36.300014 (../source4/torture/smb2/streams.c:512) Testing stream share mode conflicts time: 2015-04-29 17:26:38.094048 failure: sharemodes [ (../source4/torture/smb2/streams.c:536) Incorrect status NT_STATUS_SHARING_VIOLATION - should be NT_STATUS_OK ] Fix coming in a minute.....
Created attachment 11002 [details] Fix for master With this patch the torture test passes: $ ./bin/smbtorture -Uuser%pass //server/share --option=torture:share1=share smb2.streams smbtorture 4.3.0pre1-DEVELOPERBUILD Using seed 1430321234 time: 2015-04-29 17:27:14.562014 progress: 1 test: sharemodes time: 2015-04-29 17:27:14.563052 (../source4/torture/smb2/streams.c:512) Testing stream share mode conflicts time: 2015-04-29 17:27:16.314663 success: sharemodes
Comment on attachment 11002 [details] Fix for master LGTM. Pushed to master !
Created attachment 11003 [details] Patch for 4.1 cherry-picked from master
Created attachment 11004 [details] Patch for 4.2 cherry-picker from master
Re-assigning to Karolin for inclusion in 4.2.next, 4.1.next.
Pushed to autobuild-v4-[1|2]-test.
Pushed to both branches. Closing out bug report. Thanks!
If I see it correctly, the change disables GPFS share modes for non-stream files completely.
Created attachment 11579 [details] Patch Pushing to master
Great, I fixed the original bug by completely disabling sharemodes. Sorry!
(In reply to Ralph Böhme from comment #10) Oh, I missed that too in review. Sorry also :-(.
Created attachment 11585 [details] Patch for 4.2 and 4.3 cherry-picked from master
Comment on attachment 11585 [details] Patch for 4.2 and 4.3 cherry-picked from master Cherry-picked from is missing, but the patch is of course fine
Pushed to autobuild-v4-[3|2]-test.
(In reply to Karolin Seeger from comment #14) Pushed to both branches. Closing out bug report. Thanks!