diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-09-28 11:47:20 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-10-10 18:04:46 -0400 |
commit | b31b30e5c76b7653b4434fcdc3c5d2b46a367c2a (patch) | |
tree | 8a1d42f6e7f8e7a74ba300f98fff24d7da1f0c8c /fs/nfsd | |
parent | 6409a5a65d2b959c3f5e2b8adfa67c349e294652 (diff) |
nfsd4: cleanup state.h comments
These comments are mostly out of date.
Reported-by: Bryan Schumaker <bjschuma@netapp.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/state.h | 45 |
1 files changed, 8 insertions, 37 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 22b065a55ea0..aa14f06af2df 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h | |||
@@ -332,25 +332,6 @@ struct nfs4_replay { | |||
332 | char rp_ibuf[NFSD4_REPLAY_ISIZE]; | 332 | char rp_ibuf[NFSD4_REPLAY_ISIZE]; |
333 | }; | 333 | }; |
334 | 334 | ||
335 | /* | ||
336 | * nfs4_stateowner can either be an open_owner, or a lock_owner | ||
337 | * | ||
338 | * so_idhash: stateid_hashtbl[] for open owner, lockstateid_hashtbl[] | ||
339 | * for lock_owner | ||
340 | * so_strhash: ownerstr_hashtbl[] for open_owner, lock_ownerstr_hashtbl[] | ||
341 | * for lock_owner | ||
342 | * so_perclient: nfs4_client->cl_perclient entry - used when nfs4_client | ||
343 | * struct is reaped. | ||
344 | * so_perfilestate: heads the list of nfs4_ol_stateid (either open or lock) | ||
345 | * and is used to ensure no dangling nfs4_ol_stateid references when we | ||
346 | * release a stateowner. | ||
347 | * so_perlockowner: (open) nfs4_ol_stateid->st_perlockowner entry - used when | ||
348 | * close is called to reap associated byte-range locks | ||
349 | * so_close_lru: (open) stateowner is placed on this list instead of being | ||
350 | * reaped (when so_perfilestate is empty) to hold the last close replay. | ||
351 | * reaped by laundramat thread after lease period. | ||
352 | */ | ||
353 | |||
354 | struct nfs4_stateowner { | 335 | struct nfs4_stateowner { |
355 | struct list_head so_strhash; /* hash by op_name */ | 336 | struct list_head so_strhash; /* hash by op_name */ |
356 | struct list_head so_stateids; | 337 | struct list_head so_stateids; |
@@ -366,7 +347,14 @@ struct nfs4_stateowner { | |||
366 | struct nfs4_openowner { | 347 | struct nfs4_openowner { |
367 | struct nfs4_stateowner oo_owner; /* must be first field */ | 348 | struct nfs4_stateowner oo_owner; /* must be first field */ |
368 | struct list_head oo_perclient; | 349 | struct list_head oo_perclient; |
369 | struct list_head oo_close_lru; /* tail queue */ | 350 | /* |
351 | * We keep around openowners a little while after last close, | ||
352 | * which saves clients from having to confirm, and allows us to | ||
353 | * handle close replays if they come soon enough. The close_lru | ||
354 | * is a list of such openowners, to be reaped by the laundromat | ||
355 | * thread eventually if they remain unused: | ||
356 | */ | ||
357 | struct list_head oo_close_lru; | ||
370 | struct nfs4_ol_stateid *oo_last_closed_stid; | 358 | struct nfs4_ol_stateid *oo_last_closed_stid; |
371 | time_t oo_time; /* time of placement on so_close_lru */ | 359 | time_t oo_time; /* time of placement on so_close_lru */ |
372 | #define NFS4_OO_CONFIRMED 1 | 360 | #define NFS4_OO_CONFIRMED 1 |
@@ -443,23 +431,6 @@ static inline struct file *find_any_file(struct nfs4_file *f) | |||
443 | return f->fi_fds[O_RDONLY]; | 431 | return f->fi_fds[O_RDONLY]; |
444 | } | 432 | } |
445 | 433 | ||
446 | /* | ||
447 | * nfs4_ol_stateid can either be an open stateid or (eventually) a lock stateid | ||
448 | * | ||
449 | * (open)nfs4_ol_stateid: one per (open)nfs4_stateowner, nfs4_file | ||
450 | * | ||
451 | * st_hash: stateid_hashtbl[] entry or lockstateid_hashtbl entry | ||
452 | * st_perfile: file_hashtbl[] entry. | ||
453 | * st_perfile_state: nfs4_stateowner->so_perfilestate | ||
454 | * st_perlockowner: (open stateid) list of lock nfs4_stateowners | ||
455 | * st_access_bmap: used only for open stateid | ||
456 | * st_deny_bmap: used only for open stateid | ||
457 | * st_openstp: open stateid lock stateid was derived from | ||
458 | * | ||
459 | * XXX: open stateids and lock stateids have diverged sufficiently that | ||
460 | * we should consider defining separate structs for the two cases. | ||
461 | */ | ||
462 | |||
463 | /* "ol" stands for "Open or Lock". Better suggestions welcome. */ | 434 | /* "ol" stands for "Open or Lock". Better suggestions welcome. */ |
464 | struct nfs4_ol_stateid { | 435 | struct nfs4_ol_stateid { |
465 | struct nfs4_stid st_stid; | 436 | struct nfs4_stid st_stid; |