afs, rxrpc: Clean up refcounting on afs_cell and afs_server records
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest11 patches 0 repliesNew
- v115 patches 7 repliesSuperseded 5 of 15 applied
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | afs: Fix afs_atcell_get_link() to handle RCU pathwalkfs/ fs/ fs/ +1 more | +22 | 0 replies | |
| 2/11 | afs: Remove the "autocell" mount optionfs/ fs/ fs/ +1 more | +3 | 0 replies | |
| 3/11 | afs: Change dynroot to create contents on demandfs/ fs/ fs/ +3 more | +213 | 0 replies | |
| 4/11 | afs: Improve afs_volume tracing to display a debug IDfs/ fs/ include/ | +21 | 0 replies | |
| 5/11 | afs: Improve server refcount/active count tracingfs/ fs/ fs/ +2 more | +26 | 0 replies | |
| 6/11 | afs: Make afs_lookup_cell() take a trace notefs/ fs/ fs/ +5 more | +28 | 0 replies | |
| 7/11 | afs: Drop the net parameter from afs_unuse_cell()fs/ fs/ fs/ +5 more | +18 | 0 replies | |
| 8/11 | rxrpc: Allow the app to store private data on peer structsinclude/ net/ net/ | +29 | 0 replies | |
| 9/11 | afs: Use the per-peer app data provided by rxrpcfs/ fs/ fs/ +6 more | +120 | 0 replies | |
| 10/11 | afs: Fix afs_server ref accountingfs/ fs/ fs/ +4 more | +289 | 0 replies | |
| 11/11 | afs: Simplify cell record handlingfs/ fs/ fs/ +4 more | +187 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 00/11] afs, rxrpc: Clean up refcounting on afs_cell and afs_server records
This series fixes an occasional hang that's only really encountered when rmmod'ing the kafs module, one of the reasons why I'm proposing it for the next merge window rather than immediate upstreaming. The changes include:
(1) Fix missing handling of RCU pathwalk in afs_atcell_get_link().
(2) Remove the "-o autocell" mount option. This is obsolete with the dynamic root and removing it makes the next patch slightly easier.
(3) Change how the dynamic root mount is constructed. Currently, the root directory is (de)populated when it is (un)mounted if there are cells already configured and, further, pairs of automount points have to be created/removed each time a cell is added/deleted.
This is changed so that readdir on the root dir lists all the known cell automount pairs plus the @cell symlinks and the inodes and dentries are constructed by lookup on demand. This simplifies the cell management code.
(4) A few improvements to the afs_volume tracepoint.
(5) A few improvements to the afs_server tracepoint.
(6) Pass trace info into the afs_lookup_cell() function to allow the trace log to indicate the purpose of the lookup.
(7) Remove the 'net' parameter from afs_unuse_cell() as it's superfluous.
(8) In rxrpc, allow a kernel app (such as kafs) to store a word of information on rxrpc_peer records.
(9) Use the information stored on the rxrpc_peer record to point to the afs_server record. This allows the server address lookup to be done away with.
(10) Simplify the afs_server ref/activity accounting to make each one self-contained and not garbage collected from the cell management work item.
(11) Simplify the afs_cell ref/activity accounting to make each one of these also self-contained and not driven by a central management work item.
The current code was intended to make it such that a single timer for the namespace and one work item per cell could do all the work required to maintain these records. This, however, made for some sequencing problems when cleaning up these records. Further, the attempt to pass refs along with timers and work items made getting it right rather tricky when the timer or work item already had a ref attached and now a ref had to be got rid of.
The patches are here:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-next
Thanks,
David
Changes
=======
ver #4)
- Add a fix patch to handle RCU pathwalk in afs_atcell_get_link().
ver #3)
- Fix the fix for an error check of the form "unsigned value < 0".
ver #2)
- Fix an error check of the form "unsigned value < 0".
David Howells (11):
afs: Fix afs_atcell_get_link() to handle RCU pathwalk
afs: Remove the "autocell" mount option
afs: Change dynroot to create contents on demand
afs: Improve afs_volume tracing to display a debug ID
afs: Improve server refcount/active count tracing
afs: Make afs_lookup_cell() take a trace note
afs: Drop the net parameter from afs_unuse_cell()
rxrpc: Allow the app to store private data on peer structs
afs: Use the per-peer app data provided by rxrpc
afs: Fix afs_server ref accounting
afs: Simplify cell record handling
fs/afs/addr_list.c | 50 +++ fs/afs/cell.c | 446 ++++++++++++--------------- fs/afs/cmservice.c | 82 +---- fs/afs/dir.c | 5 +- fs/afs/dynroot.c | 501 +++++++++++++------------------ fs/afs/fs_probe.c | 32 +- fs/afs/fsclient.c | 4 +- fs/afs/internal.h | 100 +++--- fs/afs/main.c | 16 +- fs/afs/mntpt.c | 5 +- fs/afs/proc.c | 19 +- fs/afs/rxrpc.c | 8 +- fs/afs/server.c | 601 ++++++++++++++++--------------------- fs/afs/server_list.c | 6 +- fs/afs/super.c | 25 +- fs/afs/vl_alias.c | 7 +- fs/afs/vl_rotate.c | 2 +- fs/afs/volume.c | 15 +- include/net/af_rxrpc.h | 2 + include/trace/events/afs.h | 83 ++--- net/rxrpc/ar-internal.h | 1 + net/rxrpc/peer_object.c | 30 +- 22 files changed, 927 insertions(+), 1113 deletions(-)