knfsd: set the response bitmask for NFS4_CREATE_EXCLUSIVE (repost)
Subsystems (2)
PATCH 1/1 knfsd: set the response bitmask for NFS4_CREATE_EXCLUSIVE (repost)
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.
fs/nfsd/nfs4proc.c +9 -1
@@ -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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 1 line · On Wednesday June 27, [email protected] wrote:
Haven't seen any comments on this patch so far. Neil, any thoughts?
I don't remember seeing it before, but that doesn't say much... My thoughts:
1/ I would like it to come to me through Bruce.
2/ The comment is good, but seems to be asking for a matching comment
in nfsd_create_v3.
NeilBrown
Quoted 27 lines
--------------[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 <[email protected]>fs/nfsd/nfs4proc.c +2
-1@@ -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);
fs/nfsd/nfs4proc.c do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o · line 113
Quoted 10 lines
fs/nfsd/nfs4proc.c +7
-0+ +/* 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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 6 lines · Neil Brown
Quoted 1 line · On Wednesday June 27, [email protected] wrote:
Haven't seen any comments on this patch so far. Neil, any thoughts?
I don't remember seeing it before, but that doesn't say much... My thoughts:
1/ I would like it to come to me through Bruce.
Sorry, should have picked it up before. I'm at OLS right now, and a litlte slower than usual; I'll get to it.--b.
Quoted 2 lines
2/ The comment is good, but seems to be asking for a matching comment
innfsd_create_v3.
Here's a respun patch that includes an updated comment in nfsd_create_v3. Look ok?
------------[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.
fs/nfsd/nfs4proc.c +9 -1
@@ -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);
fs/nfsd/vfs.c +4 -1
@@ -1284,7 +1284,10 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp,if (createmode ==NFS3_CREATE_EXCLUSIVE ) {/* solaris7 gets confused (bugid 4218508) if these have -* the high bit set, so just clear the high bits. +* the high bit set, so just clear the high bits. If this is +* ever changed to use different attrs for storing the +* verifier, then do_open_lookup() will also need to be fixed +* accordingly. */ v_mtime = verifier[0 ]&0x7fffffff ; v_atime = verifier[1 ]&0x7fffffff ;
-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 2 lines · Jeff Layton
Here's a respun patch that includes an updated comment in
nfsd_create_v3. Look ok?
Looks fine to me, thanks. So this tells the client which attributes it should set in a subsequent setattr?
It's queued up in my tree, so if Neil doesn't take it then I'll pass it along to him for v2.6.23....
--b.
-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 7 lines · On Wed, 27 Jun 2007 23:14:16 -0400 "J. Bruce Fields" <[email protected]>…
Quoted 2 lines · Jeff Layton
Here's a respun patch that includes an updated comment in
nfsd_create_v3. Look ok?Looks fine to me, thanks. So this tells the client which attributes it should set in a subsequent setattr?
Yep. There's a client side patch that went into Trond's tree recently too. Hopefully I've interpreted the spec correctly ;-)
Quoted 3 lines
It's queued up in my tree, so if Neil doesn't take it then I'll pass it along to him for v2.6.23....
Thanks!
Quoted 11 lines
--b.
-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Signature · 1 line
Jeff Layton <[email protected]>
Quoted 6 lines · On Thu, 28 Jun 2007 07:26:45 +1000 Neil Brown <[email protected]> wrote:
Quoted 1 line · On Wednesday June 27, [email protected] wrote:
Haven't seen any comments on this patch so far. Neil, any thoughts?
I don't remember seeing it before, but that doesn't say much... My thoughts:
1/ I would like it to come to me through Bruce.
Ahh, I'll make a mental note to badger Bruce in the future ;-)
Quoted 3 lines
2/ The comment is good, but seems to be asking for a matching comment
innfsd_create_v3.
Good point, let me add a comment there. I'll respin the patch and resend.
Quoted 49 lines
NeilBrown
Quoted 27 lines
--------------[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 <[email protected]>fs/nfsd/nfs4proc.c +2
-1@@ -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);fs/nfsd/nfs4proc.c do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o · line 113
Quoted 10 lines
fs/nfsd/nfs4proc.c +7
-0+ +/* 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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Signature · 10 lines
Jeff Layton <[email protected]> ------------------------------------------------------------------------- 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 - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs