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.
Created attachment 294690 [details] Changes made to sys.c for new kobject calls
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.
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