Skip to content

NFSD: Improve fault injection

[email protected] linux-nfs 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 2 repliesIn review
  2. v310 patches 10 repliesSuperseded
  3. v210 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v110 patches3 repliesSuperseded

Changes in v4 from the cover letter

- Access lock state from open owners rather than requiring a network namespace pointer.
- Don't produce a null pointer expection if fault injection is attempted after loading the nfsd module but before running any nfsd threads.

- Bryan

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9NFSD: Lock state before calling fault injection functionfs/nfsd/fault_inject.c fs/nfsd/nfs4state.c+4 -160 replies
2/9NFSD: Clean up forgetting clientsfs/nfsd/netns.h fs/nfsd/nfs4state.c+23 -50 replies
3/9NFSD: Clean up forgetting locksfs/nfsd/nfs4state.c+28 -80 replies
4/9NFSD: Clean up forgetting openownersfs/nfsd/nfs4state.c+22 -270 replies
5/9NFSD: Clean up forgetting and recalling delegationsfs/nfsd/nfs4state.c+50 -440 replies
6/9NFSD: Fault injection operations take a per-client forget functionfs/nfsd/fault_inject.c fs/nfsd/nfs4state.c fs/nfsd/state.h+16 -420 replies
7/9NFSD: Reading a fault injection file prints a state countfs/nfsd/fault_inject.c fs/nfsd/nfs4state.c fs/nfsd/state.h+58 -20 replies
8/9NFSD: Add a custom file operations structure for fault injectionfs/nfsd/fault_inject.c+49 -70 replies
9/9NFSD: Forget state for a specific clientfs/nfsd/fault_inject.c fs/nfsd/nfs4state.c fs/nfsd/state.h+49 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/9] NFSD: Improve fault injection

From: Bryan Schumaker <[email protected]>

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 6 patches clean up the current code and prepare it for specific client state removal. Patch 7 adds printing 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 8 adds in a custom file operations structure so users can write strings to fault injection files in addition to u64s. Finally, patch 9 allows users to remove state by writing a client's IP address to one of the files.

Changes in v4:
- Access lock state from open owners rather than requiring a network namespace pointer.
- Don't produce a null pointer expection if fault injection is attempted after loading the nfsd module but before running any nfsd threads.

- Bryan

Bryan Schumaker (9):
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 | 112 ++++++++++++++++++++++++----
 fs/nfsd/netns.h        |   3 +
 fs/nfsd/nfs4state.c    | 197 ++++++++++++++++++++++++++++++-------------------
 fs/nfsd/state.h        |  18 +++--
 4 files changed, 237 insertions(+), 93 deletions(-)
Signature · 1 line
1.8.0.1