Re: [PATCH 4/5] NFSv4: don't reprocess cached open CLAIM_PREVIOUS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-10-21 at 13:10 -0400, Weston Andros Adamson wrote:
+AD4- Cached opens have already been handled by +AF8-nfs4+AF8-opendata+AF8-reclaim+AF8-to+AF8-nfs4+AF8-state
+AD4- and can safely skip being reprocessed, but must still call update+AF8-open+AF8-stateid
+AD4- to make sure that all active fmodes are recovered.
+AD4- 
+AD4- Signed-off-by: Weston Andros Adamson +ADw-dros+AEA-netapp.com+AD4-
+AD4- ---
+AD4-  fs/nfs/nfs4proc.c +AHw- 17 +-+-+-+-+-+-+-+-+-+-+-+-+-----
+AD4-  1 file changed, 13 insertions(+-), 4 deletions(-)
+AD4- 
+AD4- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
+AD4- index 8ae1589..a3b78df 100644
+AD4- --- a/fs/nfs/nfs4proc.c
+AD4- +-+-+- b/fs/nfs/nfs4proc.c
+AD4- +AEAAQA- -1315,12 +-1315,15 +AEAAQA- +AF8-nfs4+AF8-opendata+AF8-reclaim+AF8-to+AF8-nfs4+AF8-state(struct nfs4+AF8-opendata +ACo-data)
+AD4-  +AHs-
+AD4-  	struct inode +ACo-inode +AD0- data-+AD4-state-+AD4-inode+ADs-
+AD4-  	struct nfs4+AF8-state +ACo-state +AD0- data-+AD4-state+ADs-
+AD4- +-	bool cached+AF8-open +AD0- false+ADs-
+AD4-  	int ret+ADs-
+AD4-  
+AD4- -	/+ACo- allow cached opens (+ACE-rpc+AF8-done +ACYAJg- +ACE-rpc+AF8-status) +ACo-/
+AD4- -	if (+ACE-data-+AD4-rpc+AF8-done +ACYAJg- data-+AD4-rpc+AF8-status) +AHs-
+AD4- -		ret +AD0- data-+AD4-rpc+AF8-status+ADs-
+AD4- -		goto err+ADs-
+AD4- +-	if (+ACE-data-+AD4-rpc+AF8-done) +AHs-
+AD4- +-		if (data-+AD4-rpc+AF8-status) +AHs-
+AD4- +-			ret +AD0- data-+AD4-rpc+AF8-status+ADs-
+AD4- +-			goto err+ADs-
+AD4- +-		+AH0- else
+AD4- +-			cached+AF8-open +AD0- true+ADs-

This too was replaced by a simplified version. Once we get rid of the
state +AD0APQ- NULL check, we can just replace the above with a 'goto update'

+AD4-  	+AH0-
+AD4-  
+AD4-  	/+ACo- referenced the passed state +ACo-/
+AD4- +AEAAQA- -1328,6 +-1331,10 +AEAAQA- +AF8-nfs4+AF8-opendata+AF8-reclaim+AF8-to+AF8-nfs4+AF8-state(struct nfs4+AF8-opendata +ACo-data)
+AD4-  	if (state +AD0APQ- NULL +AHwAfA- +ACE-atomic+AF8-inc+AF8-not+AF8-zero(+ACY-state-+AD4-count))
+AD4-  		goto err+ADs-
+AD4-  
+AD4- +-	/+ACo- cached opens have already been processed +ACo-/
+AD4- +-	if (cached+AF8-open)
+AD4- +-		goto update+ADs-
+AD4- +-
+AD4-  	ret +AD0- nfs+AF8-refresh+AF8-inode(inode, +ACY-data-+AD4-f+AF8-attr)+ADs-
+AD4-  	if (ret)
+AD4-  		goto err+AF8-put+ADs-
+AD4- +AEAAQA- -1336,6 +-1343,8 +AEAAQA- +AF8-nfs4+AF8-opendata+AF8-reclaim+AF8-to+AF8-nfs4+AF8-state(struct nfs4+AF8-opendata +ACo-data)
+AD4-  
+AD4-  	if (data-+AD4-o+AF8-res.delegation+AF8-type +ACEAPQ- 0)
+AD4-  		nfs4+AF8-opendata+AF8-check+AF8-deleg(data, state)+ADs-
+AD4- +-
+AD4- +-update:
+AD4-  	update+AF8-open+AF8-stateid(state, +ACY-data-+AD4-o+AF8-res.stateid, NULL,
+AD4-  			    data-+AD4-o+AF8-arg.fmode)+ADs-
+AD4-  

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust+AEA-netapp.com
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux