Bug 762577 (GLUSTER-845)

Summary: NFS BETA Test - Test Case 1: 4dist-repl-chown1m
Product: [Community] GlusterFS Reporter: Sampath <sampath.kumar>
Component: stat-prefetchAssignee: Raghavendra G <raghavendra>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: mainlineCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sampath 2010-04-22 04:32:46 UTC
Attached NFS Server Log file [nfs-server.log.gz] in
  dev.gluster.com:/share/tickets/845  directory.

Comment 1 Sampath 2010-04-22 07:03:10 UTC
Getting Following Error When trying to execute following command on nfs share.

TestCase1 : 4Dist-Repl-chown1m
MountPoint
===========
ec2-204-236-214-10.compute-1.amazonaws.com:/statprefetch on /mnt/TestCase1 type nfs (rw,addr=10.194.170.4)

Test Comman Ran
================
[root@ip-10-195-95-65 TestCase1]# cd
[root@ip-10-195-95-65 ~]# for i in $(seq 1 1000000); do touch /mnt/TestCase1/$i; done
     Done Without Error  [Took Long Time. Approx. 12 Hrs]


[root@ip-10-195-95-65 ~]# chown -R 500:500 /mnt/TestCase1/

chown: changing ownership of `/mnt/TestCase1/': Invalid argument

Comment 2 Shehjar Tikoo 2010-04-22 08:26:19 UTC
The cause of the problem is the following error return from stat prefetch:

[2010-04-22 02:46:48] D [nfs3-helpers.c:2058:nfs3_log_common_call] nfs-nfsv3: XID: 66a6e2cd, SETATTR: args: FH: hashcount 0, xlid 0, gen 0, ino 1
[2010-04-22 02:46:48] E [stat-prefetch.c:2113:sp_setattr] statprefetch: invalid argument: loc->parent
[2010-04-22 02:46:48] D [nfs3-helpers.c:2190:nfs3_log_common_res] nfs-nfsv3: XID: 66a6e2cd, SETATTR: NFS: 22(Invalid argument for operation), POSIX: 22(Invalid argument)

Comment 3 Shehjar Tikoo 2010-04-22 08:38:20 UTC
sp does a lot of the checks below:
        GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,           
                                        op_errno, EINVAL);          

There is no reason for sp to be checking for loc->parent because it can be NULL in case the loc->inode is the root inode. For nfs-beta branch I am going to simply remove these checks and leave a proper fix up to Raghu.

Change needs to be backported in case we need to move NFS xlator to release-3.o branch.

Comment 4 Anand Avati 2010-04-23 10:33:06 UTC
PATCH: http://patches.gluster.com/patch/3157 in master (stat-prefetch: Remove checks for loc->parent)

Comment 5 Raghavendra G 2010-04-26 15:26:31 UTC
Those checks are redundant ones. Hence patch submitted is ok.