Bug 432544

Summary: GFS: write error on NFS export under 2.6.25-rc1 with gfs-kernel from CVS
Product: Red Hat Enterprise Linux 5 Reporter: Glen Dosey <doseyg>
Component: gfs-kmodAssignee: Robert Peterson <rpeterso>
Status: CLOSED UPSTREAM QA Contact: GFS Bugs <gfs-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.1CC: edamato, michael.hagmann
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-08 20:34:42 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:
Attachments:
Description Flags
Changes made to sys.c for new kobject calls none

Description Glen Dosey 2008-02-12 18:55:38 UTC
Description of problem:
Write errors occur when writing to a file over NFS located on a GFS filesystem.

Version-Release number of selected component (if applicable):
Built from CVS

How reproducible:
Consistently reproducible against recent kernels.


Steps to Reproduce:
1. Server is fully patched RHEL5 x86_64 system with csgfs packages from RHN.
Obtain recent kernel (2.6.24 and 2.6.25-rc1 tested ) and cluster suite from CVS
HEAD. 

2. If using 2.6.24, patch GFS2 code using
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9656b2c14c6ee0806c90a6be41dec71117fc8f50
 lest you lose data on your GFS2 volumes. If using 2.6.25-rc1, modify gfs-kernel
 sys.c to updated kobject calls (changes I made attached in diff for reference)

3. Build kernel, configure cluster suite and build gfs-kernel. Copy gfs.ko to
/lib/modules

4. Reboot with new kernel, verified GFS and GFS2 work properly from local
system. Export GFS filesystem to fully patched RHEL5 x86_64 NFS client.

5. On client, copy file to NFS/GFS filesystem. The file will be created but
errors will occur on issuing a close() and the file will contain no data.
Directly echoing text to a file works.
  
Actual results:
[root@nccws00 gfs]# cp /tmp/patch-2.6.24.2.bz2 .
cp: closing `./patch-2.6.24.2.bz2': Invalid argument

and a snippet from strace on the NFS client from the above command:
read(3, "\260\370\217\264\255LJ\22\300@\244\365\25hu\321\23\4T\356\26fy\2\204
\344\f\0218\37P"..., 4096) = 264
write(4, "\260\370\217\264\255LJ\22\300@\244\365\25hu\321\23\4T\356\26fy\2\204
\344\f\0218\37P"..., 264) = 264
read(3, "", 4096)                       = 0
close(4)                                = -1 EINVAL (Invalid argument)


Expected results:


Additional info:
Tested against 2.6.24, 2.6.24-1 2.6.24-2 2.6.24-git18 and 2.6.25-rc1 with
cluster obtained from CVS HEAD for each attempt. Kernel config copied from
/usr/src/kernels/ and a make menuconfig performed. NFS exports of the GFS
filesystem work when using a Red Hat (via RHN) kernel. There are no apparent
errors in any logs on either client or server.

Comment 1 Glen Dosey 2008-02-12 18:55:38 UTC
Created attachment 294690 [details]
Changes made to sys.c for new kobject calls

Comment 2 Robert Peterson 2008-02-12 20:58:49 UTC
Thanks for the patch to sys.c.  I'll make sure it gets in there.
I've successfully recreated the problem, so that's a good first step.
The nfs code for gfs (mainly, ops_export.c) has changed quite a bit
from the RHEL5 original.  I'll try to check if those changes were done
correctly.


Comment 3 Robert Peterson 2008-05-08 20:34:42 UTC
Fabio D. updated the gfs kernel code to include this patch with this
commit to the cluster git tree:

9fecacd358dba0a191f29e7932281fc862a6ec33

Since this only affects upstream kernels, I'm closing this as UPSTREAM.

Bob Peterson