Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267181
b: refs/heads/master
c: b31b30e
h: refs/heads/master
i:
  267179: 3d4d3e7
v: v3
  • Loading branch information
J. Bruce Fields committed Oct 10, 2011
1 parent 33bcc46 commit e9a7dba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6409a5a65d2b959c3f5e2b8adfa67c349e294652
refs/heads/master: b31b30e5c76b7653b4434fcdc3c5d2b46a367c2a
45 changes: 8 additions & 37 deletions trunk/fs/nfsd/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,25 +332,6 @@ struct nfs4_replay {
char rp_ibuf[NFSD4_REPLAY_ISIZE];
};

/*
* nfs4_stateowner can either be an open_owner, or a lock_owner
*
* so_idhash: stateid_hashtbl[] for open owner, lockstateid_hashtbl[]
* for lock_owner
* so_strhash: ownerstr_hashtbl[] for open_owner, lock_ownerstr_hashtbl[]
* for lock_owner
* so_perclient: nfs4_client->cl_perclient entry - used when nfs4_client
* struct is reaped.
* so_perfilestate: heads the list of nfs4_ol_stateid (either open or lock)
* and is used to ensure no dangling nfs4_ol_stateid references when we
* release a stateowner.
* so_perlockowner: (open) nfs4_ol_stateid->st_perlockowner entry - used when
* close is called to reap associated byte-range locks
* so_close_lru: (open) stateowner is placed on this list instead of being
* reaped (when so_perfilestate is empty) to hold the last close replay.
* reaped by laundramat thread after lease period.
*/

struct nfs4_stateowner {
struct list_head so_strhash; /* hash by op_name */
struct list_head so_stateids;
Expand All @@ -366,7 +347,14 @@ struct nfs4_stateowner {
struct nfs4_openowner {
struct nfs4_stateowner oo_owner; /* must be first field */
struct list_head oo_perclient;
struct list_head oo_close_lru; /* tail queue */
/*
* We keep around openowners a little while after last close,
* which saves clients from having to confirm, and allows us to
* handle close replays if they come soon enough. The close_lru
* is a list of such openowners, to be reaped by the laundromat
* thread eventually if they remain unused:
*/
struct list_head oo_close_lru;
struct nfs4_ol_stateid *oo_last_closed_stid;
time_t oo_time; /* time of placement on so_close_lru */
#define NFS4_OO_CONFIRMED 1
Expand Down Expand Up @@ -443,23 +431,6 @@ static inline struct file *find_any_file(struct nfs4_file *f)
return f->fi_fds[O_RDONLY];
}

/*
* nfs4_ol_stateid can either be an open stateid or (eventually) a lock stateid
*
* (open)nfs4_ol_stateid: one per (open)nfs4_stateowner, nfs4_file
*
* st_hash: stateid_hashtbl[] entry or lockstateid_hashtbl entry
* st_perfile: file_hashtbl[] entry.
* st_perfile_state: nfs4_stateowner->so_perfilestate
* st_perlockowner: (open stateid) list of lock nfs4_stateowners
* st_access_bmap: used only for open stateid
* st_deny_bmap: used only for open stateid
* st_openstp: open stateid lock stateid was derived from
*
* XXX: open stateids and lock stateids have diverged sufficiently that
* we should consider defining separate structs for the two cases.
*/

/* "ol" stands for "Open or Lock". Better suggestions welcome. */
struct nfs4_ol_stateid {
struct nfs4_stid st_stid;
Expand Down

0 comments on commit e9a7dba

Please sign in to comment.