Bug 801364

Summary: writes on files failed with "Bad file descriptor" error when quota limit-usage was set
Product: [Community] GlusterFS Reporter: Shwetha Panduranga <shwetha.h.panduranga>
Component: quotaAssignee: Raghavendra G <rgowdapp>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: mainlineCC: gluster-bugs, rahulcs, rfortier, saujain
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:13:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 817967    
Attachments:
Description Flags
Client Log File
none
nfs log
none
client log file when dd failed reporting "Invalid Argument" none

Description Shwetha Panduranga 2012-03-08 11:25:56 UTC
Created attachment 568596 [details]
Client Log File

Description of problem:
When quota limit-usage option is set, the graph change is causing the fd's migration in complete and fail with EBADF. 

Hence, writes on files fails during the limit-usage set operation. 

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

Steps to Reproduce:
1.Create distribute-Replicate volume (2 x 2). Start the volume
2.auth.allow is set to client1
3.create a gluster,nfs mount from client1
4.create a nfs mount from client2
5.Start dd from gluster,nfs mount (client1)
6.enable quota on the volume
7.set quota limit-usage to 50GB

Actual results:
Gluster Mount (client1):-
---------------
[03/08/12 - 20:44:03 root@APP-CLIENT1 gfsc1]# dd if=/dev/zero of=gfsf1 bs=1M count=102400
dd: writing `gfsf1': Bad file descriptor
dd: closing output file `gfsf1': Bad file descriptor
[03/08/12 - 22:09:32 root@APP-CLIENT1 gfsc1]# ls -l
ls: cannot access nfsf1: Input/output error
ls: cannot access gfsf1: Input/output error
total 0
?????????? ? ? ? ?            ? gfsf1
?????????? ? ? ? ?            ? nfsf1


NFS Mount (client1):-
-------------
[03/08/12 - 20:44:29 root@APP-CLIENT1 nfsc1]# dd if=/dev/zero of=nfsf1 bs=1M count=102400
dd: writing `nfsf1': Input/output error
2170+0 records in
2169+0 records out

[03/08/12 - 20:50:05 root@APP-CLIENT1 nfsc1]# ls -l
ls: cannot access nfsf1: Input/output error
ls: cannot access gfsf1: Input/output error
total 0
-????????? ? ? ? ?            ? gfsf1
-????????? ? ? ? ?            ? nfsf1

NFS Mount(client2):-
-------------------
[03/08/12 - 15:25:03 root@Shwetha-Laptop nfsc1]# df -h .
Filesystem            Size  Used Avail Use% Mounted on
192.168.2.35:/dstore     0  -95G   95G   -  /mnt/nfsc1

[03/08/12 - 15:27:56 root@Shwetha-Laptop nfsc1]# ls -l
ls: cannot access nfsf1: Input/output error
ls: cannot access gfsf1: Input/output error
total 0
-????????? ? ? ? ?            ? gfsf1
-????????? ? ? ? ?            ? nfsf1

gluster mount Client Log:-
-----------------
[2012-03-08 20:49:04.679793] D [socket.c:1807:socket_event_handler] 0-transport: disconnecting now
[2012-03-08 20:49:04.679848] W [fuse-resolve.c:346:fuse_resolve_fd] 0-fuse-resolve: migration of fd (0xe1dbdc) did not complete, failing fop with EBADF
[2012-03-08 20:49:04.679850] W [client.c:2011:client_rpc_notify] 0-dstore-client-1: Registering a grace timer


Expected results:
write operation on files should not fail. 

Additional info:

Comment 1 Shwetha Panduranga 2012-03-09 05:17:56 UTC
Created attachment 568815 [details]
nfs log

Comment 2 Shwetha Panduranga 2012-03-09 05:19:38 UTC
Created attachment 568816 [details]
client log file when dd failed reporting "Invalid Argument"

Comment 3 Anand Avati 2012-03-12 20:08:53 UTC
CHANGE: http://review.gluster.com/2917 (features/quota: store quota context even for the cases where loc.name is NULL) merged in master by Anand Avati (avati)

Comment 4 Raghavendra G 2012-03-14 04:45:56 UTC
*** Bug 788962 has been marked as a duplicate of this bug. ***

Comment 5 Raghavendra G 2012-03-14 06:50:52 UTC
*** Bug 768299 has been marked as a duplicate of this bug. ***

Comment 6 Raghavendra G 2012-03-14 07:09:53 UTC
*** Bug 781424 has been marked as a duplicate of this bug. ***

Comment 7 Anand Avati 2012-03-14 09:59:48 UTC
CHANGE: http://review.gluster.com/2938 (features/marker: Nameless lookup related fixes) merged in master by Vijay Bellur (vijay)

Comment 8 Raghavendra G 2012-04-26 09:46:43 UTC
*** Bug 781424 has been marked as a duplicate of this bug. ***

Comment 9 Shwetha Panduranga 2012-05-04 09:04:55 UTC
Bug is fixed . verified on 3.3.0qa39