linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/10] NFSD: Improve fault injection
@ 2012-11-27 14:35 bjschuma
  2012-11-27 14:35 ` [PATCH v3 01/10] NFSD: Fold fault_inject.h into state.h bjschuma
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: bjschuma @ 2012-11-27 14:35 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

From: Bryan Schumaker <bjschuma@netapp.com>

While working on p2p-nfs, I discovered that I sometimes need to clear
state for a specific client to test all possible error recovery conditions.
The current fault injection code deletes state as it find it, so it can
be difficult to guess which state will be forgotten.  In addition, I
currently print out the amount of state forgotten but I don't give details
like "Forgot 3 locks from client w.x.y.z".  These patches set out to
improve that.

The first 7 patches clean up the current code and prepare it for specific
client state removal.  Patch 8 adds prints information to the server's logs
when a fault injection file is read (such as "Client w.x.y.z has 3 open
files").  Patch 9 adds in a custom file operations structure so users can
write strings to fault injection files in addition to u64s.  Finally, patch
10 allows users to remove state by writing a client's IP address to one of
the files.

Changes in v3:
- Patches apply cleanly to the most recent nfsd-next branch.
- Introduce non-static functions directly, rather than introducing them
  statically and then changing the definition a few patches later.
- Share more code between printing and releasing lockowners, openowners and
  delegations.

Questions, comments and suggestions are appreciated!

- Bryan

Bryan Schumaker (10):
  NFSD: Fold fault_inject.h into state.h
  NFSD: Lock state before calling fault injection function
  NFSD: Clean up forgetting clients
  NFSD: Clean up forgetting locks
  NFSD: Clean up forgetting openowners
  NFSD: Clean up forgetting and recalling delegations
  NFSD: Fault injection operations take a per-client forget function
  NFSD: Reading a fault injection file prints a state count
  NFSD: Add a custom file operations structure for fault injection
  NFSD: Forget state for a specific client

 fs/nfsd/fault_inject.c | 114 ++++++++++++++++++++++++++----
 fs/nfsd/fault_inject.h |  28 --------
 fs/nfsd/nfs4state.c    | 188 ++++++++++++++++++++++++++++++-------------------
 fs/nfsd/nfsctl.c       |   2 +-
 fs/nfsd/state.h        |  23 ++++++
 5 files changed, 239 insertions(+), 116 deletions(-)
 delete mode 100644 fs/nfsd/fault_inject.h

-- 
1.8.0.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-11-30 18:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 14:35 [PATCH v3 00/10] NFSD: Improve fault injection bjschuma
2012-11-27 14:35 ` [PATCH v3 01/10] NFSD: Fold fault_inject.h into state.h bjschuma
2012-11-28 18:01   ` J. Bruce Fields
2012-11-27 14:35 ` [PATCH v3 02/10] NFSD: Lock state before calling fault injection function bjschuma
2012-11-27 14:35 ` [PATCH v3 03/10] NFSD: Clean up forgetting clients bjschuma
2012-11-28 16:29   ` J. Bruce Fields
2012-11-28 16:34     ` Bryan Schumaker
2012-11-28 16:47       ` J. Bruce Fields
2012-11-28 16:49         ` Bryan Schumaker
2012-11-28 16:56           ` J. Bruce Fields
2012-11-28 16:57             ` J. Bruce Fields
2012-11-28 20:53               ` Bryan Schumaker
2012-11-30 18:40                 ` J. Bruce Fields
2012-11-28 16:57             ` Bryan Schumaker
2012-11-27 14:35 ` [PATCH v3 04/10] NFSD: Clean up forgetting locks bjschuma
2012-11-27 14:35 ` [PATCH v3 05/10] NFSD: Clean up forgetting openowners bjschuma
2012-11-27 14:35 ` [PATCH v3 06/10] NFSD: Clean up forgetting and recalling delegations bjschuma
2012-11-27 14:35 ` [PATCH v3 07/10] NFSD: Fault injection operations take a per-client forget function bjschuma
2012-11-27 14:35 ` [PATCH v3 08/10] NFSD: Reading a fault injection file prints a state count bjschuma
2012-11-27 14:35 ` [PATCH v3 09/10] NFSD: Add a custom file operations structure for fault injection bjschuma
2012-11-27 14:35 ` [PATCH v3 10/10] NFSD: Forget state for a specific client bjschuma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).