http://bugzilla.novell.com/show_bug.cgi?id=495905
User r.ems@gmx.net added comment
http://bugzilla.novell.com/show_bug.cgi?id=495905#c1
--- Comment #1 from Richard Ems 2009-04-17 05:51:24 MDT ---
And here Suresh's answer:
Thanks for the report.
If you have ACLs enabled, I think this error is due to an error in XDR
iovec len handling when setting ACLs. This error is present in upstream
kernel too and we discussed this upstream and the below patch would fix
the problem. I will be commiting this fix to openSUSE 11.1 quite soon.
OTOH, please open a bug report in case if you see issues, so that other
customers who face the same problem will get to know about the issue as
well when searching bugzilla.
From: Trond Myklebust
Date: Wed, 15 Apr 2009 13:58:45 -0400
Subject: [PATCH] NFS: Fix the XDR iovec calculation in nfs3_xdr_setaclargs
Commit ae46141ff08f1965b17c531b571953c39ce8b9e2 (NFSv3: Fix posix ACL code)
introduces a bug in the calculation of the XDR header iovec. In the case
where we are inlining the acls, we need to adjust the length of the iovec
req->rq_svec, in addition to adjusting the total buffer length.
Signed-off-by: Trond Myklebust
---
fs/nfs/nfs3xdr.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index e6a1932..35869a4 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -713,7 +713,8 @@ nfs3_xdr_setaclargs(struct rpc_rqst *req, __be32 *p,
if (args->npages != 0)
xdr_encode_pages(buf, args->pages, 0, args->len);
else
- req->rq_slen += args->len;
+ req->rq_slen = xdr_adjust_iovec(req->rq_svec,
+ p + XDR_QUADLEN(args->len));
err = nfsacl_encode(buf, base, args->inode,
(args->mask & NFS_ACL) ?
rems@guille:/net/c3m/home/work # ls -l test-file
-rw-r-----+ 1 rems users 0 2009-04-16 21:35 test-file
rems@guille:/net/c3m/home/work # echo "Hello world" > test-file
rems@guille:/net/c3m/home/work # ls -l test-file
-rw-r-----+ 1 rems users 12 2009-04-16 21:35 test-file
At the first echo command, the file gets generated, but it is empty. The
second echo command runs ok.
The server is an openSUSE 11.1 with all actual patches.
The clients are all also openSUSE 11.1 with all actual patches.
The error happens on all the clients, but the same command on the server
runs ok.
The exported filesystem is a XFS filesystem with ACLs enabled, and the
error only occurs on directories which have ACLs set. On directories
without ACLs everything seems to work fine.
Can you apply the above patch and test whether it fixes the problem for you?
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.