Skip to content

RFC AFS: Namespacing part 1

David Howells linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11workqueue: Add a decrement-after-return and wake if 0 facilityinclude/linux/workqueue.h kernel/workqueue.c kernel/workqueue_internal.h+27 -03 replies
2/11refcount: Implement inc/decrement-and-return functionsinclude/linux/refcount.h lib/refcount.c+79 -09 replies
3/11Pass mode to wait_on_atomic_t() action funcs and provide default actionsarch/mips/kernel/traps.c drivers/gpu/drm/drm_dp_aux_dev.c drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c +11 more+37 -980 replies
4/11Add a function to start/reduce a timerinclude/linux/timer.h kernel/time/timer.c+42 -82 replies
5/11afs: Lay the groundwork for supporting network namespacesfs/afs/afs.h fs/afs/callback.c fs/afs/cell.c +13 more+589 -4890 replies
6/11afs: Add some protocol defsfs/afs/afs.h fs/afs/afs_vl.h+25 -60 replies
7/11afs: Update the cache index structurefs/afs/cache.c fs/afs/internal.h fs/afs/vlocation.c +1 more+50 -2510 replies
8/11afs: Keep and pass sockaddr_rxrpc addresses rather than in_addrfs/afs/cell.c fs/afs/fsclient.c fs/afs/internal.h +7 more+85 -1310 replies
9/11afs: Allow IPv6 address specification of VL serversfs/afs/cell.c fs/afs/proc.c fs/afs/rxrpc.c +2 more+36 -260 replies
10/11afs: Overhaul cell database managementfs/afs/callback.c fs/afs/cell.c fs/afs/internal.h +6 more+710 -3290 replies
11/11afs: Retry rxrpc calls with address rotation on network errorfs/afs/Makefile fs/afs/addr_list.c fs/afs/cell.c +9 more+720 -3660 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 00/11] AFS: Namespacing part 1

Here are some changes to the AFS filesystem that form the first part of network-namespacing and IPv6 enabling the AFS filesystem. AF_RXRPC is already namespaced.

This is built on AF_RXRPC changes tagged with rxrpc-next-20170829 (which is also in net-next).

The AFS changes are:

(1) Create a dummy AFS network namespace and shift a bunch of global things into it and start using it.

(2) Add some more AFS RPC protocol definitions.

(3) Update the cache infrastructure to remove some stuff that is redundant or not actually useful and increment the version.

(4) Keep track of internal addresses in terms of sockaddr_rxrpc structs rather than in_addr structs. This will enable the use of IPv6.

(5) Allow IPv6 addresses for VL servers to be specified. Note that this doesn't help with finding FS servers as that requires a protocol change. Such a protocol extension is available in the AuriStor AFS-compatible server, though I haven't implemented that yet.

(6) Overhaul cell database management to manage them better, making them automatically kept up to date from the DNS server.

(7) Make use of the new AF_RXRPC call-retry to implement address rotation for VL servers and FS servers without the need to re-encrypt client call data.

To make this work, I've added some extensions to the core kernel:

(1) Add a decrement-after-return function for workqueues that allows a work item to ask the workqueue manager to decrement an atomic_t and 'wake it up' if it reaches 0. This is analogous to complete_and_exit() and can be used to protect rmmod against code removal.

(2) Add refcount_inc/dec_return() functions that return the new value of the refcount_t. This makes maintaining a cache easier where you want to schedule timed garbage collection when the refcount reaches 1. It also makes tracing easier as the value is obtained atomically.

(3) Pass the wait mode to wait_on_atomic_t() and provide a default action function. This allows various default actions scattered about the place to be deleted.

(4) Add a function to start or reduce the timeout on a timer if it's already running. This makes it easier to maintain a single timer for multiple events without requiring extra locking to check/modify the timer (the timer has its own lock after all).

The patches can be found here also:

http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs

David