Bug 1326464

Summary: File descriptor flags are received incorrectly within GlusterFS layer on NetBSD
Product: [Community] GlusterFS Reporter: Anoop C S <anoopcs>
Component: fuseAssignee: Raghavendra Bhat <rabhat>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: NetBSD   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-17 10:09:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Process1
none
Process2 none

Description Anoop C S 2016-04-12 18:00:42 UTC
Description of problem:
Under NetBSD hosts, when two processes acting on same file via same glusterfs fuse mount, second process is re-using the previously opened fd by first process. As a result fd opened by second process lacks requested flags when passed to glusterfs layer.

Version-Release number of selected component (if applicable):
master

How reproducible:
Always

Steps to Reproduce:
1. Setup a simple glusterfs distribute volume on a NetBSD 7 host.
2. Mount the volume under some mount point, say /mnt.
3. Switch off the performance tranlsators
4. Create a file under mount point, say /mnt/foo.
5. Compile and run lock.c with /mnt/foo as argument till it acquires a READ lock on it.
6. Attach gdb to brick process and put breakpoint at pl_writev.
7. From another session, compile and run write.c with /mnt/foo and perform the write.

Actual results:
fd->flags = 2 when breakpoint is hit

Expected results:
fd->flags = 6 when breakpoint is hit

Comment 1 Anoop C S 2016-04-12 18:01:30 UTC
Created attachment 1146586 [details]
Process1

Comment 2 Anoop C S 2016-04-12 18:01:55 UTC
Created attachment 1146587 [details]
Process2

Comment 3 Anoop C S 2018-08-17 10:09:09 UTC
We no longer run regressions on NetBSD.