Re: [PATCH 4/5] nfsd4: construct stateid from clientid and counter

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

 



On 09/19/2011 09:15 AM, J. Bruce Fields wrote:
> Including the full clientid in the on-the-wire stateid allows more
> reliable detection of bad vs. expired stateid's, simplifies code, and
> ensures we won't reuse the opaque part of the stateid (as we currently
> do when the same openowner closes and reopens the same file).
> 
> Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>
> ---
>  fs/nfsd/nfs4state.c |   58 +++++++++++---------------------------------------
>  fs/nfsd/state.h     |   18 ++++-----------
>  2 files changed, 18 insertions(+), 58 deletions(-)
> 
[ ... ]
> diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
> index e807abb..d6aec4f 100644
> --- a/fs/nfsd/state.h
> +++ b/fs/nfsd/state.h
> @@ -353,11 +349,9 @@ struct nfs4_replay {
>  */
>  
>  struct nfs4_stateowner {

The comment describing this struct should probably be updated since so_idhash and a few other variables no longer exist.

- Bryan

> -	struct list_head        so_idhash;   /* hash by so_id */
>  	struct list_head        so_strhash;   /* hash by op_name */
>  	struct list_head        so_stateids;
>  	int			so_is_open_owner; /* 1=openowner,0=lockowner */
> -	u32                     so_id;
>  	struct nfs4_client *    so_client;
>  	/* after increment in ENCODE_SEQID_OP_TAIL, represents the next
>  	 * sequence id expected from the client: */
> @@ -415,8 +409,6 @@ struct nfs4_file {
>  	struct file_lock	*fi_lease;
>  	atomic_t		fi_delegees;
>  	struct inode		*fi_inode;
> -	u32                     fi_id;      /* used with stateowner->so_id 
> -					     * for stateid_hashtbl hash */
>  	bool			fi_had_conflict;
>  };
>  

--
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