From: Jeff Layton <jlayton@redhat.com>
To: neilb@suse.de
Cc: nfs@lists.sourceforge.net, nfsv4@linux-nfs.org
Subject: [PATCH] knfsd: set the response bitmask for NFS4_CREATE_EXCLUSIVE (repost)
Date: Wed, 27 Jun 2007 09:29:03 -0400 [thread overview]
Message-ID: <20070627092903.82f468cd.jlayton@redhat.com> (raw)
Haven't seen any comments on this patch so far. Neil, any thoughts?
--------------[snip]--------------
RFC 3530 says:
If the server uses an attribute to store the exclusive
create verifier, it will signify which attribute by setting the
appropriate bit in the attribute mask that is returned in the
results.
Linux uses the atime and mtime to store the verifier, but sends a zeroed out
bitmask back to the client. This patch makes sure that we set the correct
bits in the bitmask in this situation.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 8522729..da20674 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -99,7 +99,15 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o
status = nfsd_create_v3(rqstp, current_fh, open->op_fname.data,
open->op_fname.len, &open->op_iattr,
&resfh, open->op_createmode,
- (u32 *)open->op_verf.data, &open->op_truncate, &created);
+ (u32 *)open->op_verf.data,
+ &open->op_truncate, &created);
+
+ /* If we ever decide to use different attrs to store the
+ * verifier in nfsd_create_v3, then we'll need to change this
+ */
+ if (open->op_createmode == NFS4_CREATE_EXCLUSIVE && status == 0)
+ open->op_bmval[1] |= (FATTR4_WORD1_TIME_ACCESS |
+ FATTR4_WORD1_TIME_MODIFY);
} else {
status = nfsd_lookup(rqstp, current_fh,
open->op_fname.data, open->op_fname.len, &resfh);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next reply other threads:[~2007-06-27 13:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 13:29 Jeff Layton [this message]
2007-06-27 21:26 ` [PATCH] knfsd: set the response bitmask for NFS4_CREATE_EXCLUSIVE (repost) Neil Brown
2007-06-27 21:28 ` J. Bruce Fields
2007-06-28 1:30 ` Jeff Layton
2007-06-28 3:14 ` J. Bruce Fields
2007-06-28 10:54 ` [NFS] " Jeff Layton
2007-06-27 21:39 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070627092903.82f468cd.jlayton@redhat.com \
--to=jlayton@redhat.com \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
--cc=nfsv4@linux-nfs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.