summaryrefslogtreecommitdiffstats
path: root/fs/afs/fs_operation.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-04-30 02:03:49 +0200
committerDavid Howells <dhowells@redhat.com>2020-06-04 16:37:57 +0200
commit20325960f8750165964a6891a733e4cc15d19076 (patch)
treed372bb21037626d2fac40b9a1e6e6bea21786b8e /fs/afs/fs_operation.c
parentafs: Add a tracepoint to track the lifetime of the afs_volume struct (diff)
downloadlinux-20325960f8750165964a6891a733e4cc15d19076.tar.xz
linux-20325960f8750165964a6891a733e4cc15d19076.zip
afs: Reorganise volume and server trees to be rooted on the cell
Reorganise afs_volume objects such that they're in a tree keyed on volume ID, rooted at on an afs_cell object rather than being in multiple trees, each of which is rooted on an afs_server object. afs_server structs become per-cell and acquire a pointer to the cell. The process of breaking a callback then starts with finding the server by its network address, following that to the cell and then looking up each volume ID in the volume tree. This is simpler than the afs_vol_interest/afs_cb_interest N:M mapping web and allows those structs and the code for maintaining them to be simplified or removed. It does make a couple of things a bit more tricky, though: (1) Operations now start with a volume, not a server, so there can be more than one answer as to whether or not the server we'll end up using supports the FS.InlineBulkStatus RPC. (2) CB RPC operations that specify the server UUID. There's still a tree of servers by UUID on the afs_net struct, but the UUIDs in it aren't guaranteed unique. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/fs_operation.c')
-rw-r--r--fs/afs/fs_operation.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/afs/fs_operation.c b/fs/afs/fs_operation.c
index f57efd9d2db0..2d2dff5688a4 100644
--- a/fs/afs/fs_operation.c
+++ b/fs/afs/fs_operation.c
@@ -143,12 +143,6 @@ bool afs_begin_vnode_operation(struct afs_operation *op)
if (!afs_get_io_locks(op))
return false;
- read_seqlock_excl(&vnode->cb_lock);
- op->cbi = afs_get_cb_interest(
- rcu_dereference_protected(vnode->cb_interest,
- lockdep_is_held(&vnode->cb_lock.lock)));
- read_sequnlock_excl(&vnode->cb_lock);
-
afs_prepare_vnode(op, &op->file[0], 0);
afs_prepare_vnode(op, &op->file[1], 1);
op->cb_v_break = op->volume->cb_v_break;
@@ -183,8 +177,8 @@ void afs_wait_for_operation(struct afs_operation *op)
_enter("");
while (afs_select_fileserver(op)) {
- op->cb_s_break = op->cbi->server->cb_s_break;
- if (test_bit(AFS_SERVER_FL_IS_YFS, &op->cbi->server->flags) &&
+ op->cb_s_break = op->server->cb_s_break;
+ if (test_bit(AFS_SERVER_FL_IS_YFS, &op->server->flags) &&
op->ops->issue_yfs_rpc)
op->ops->issue_yfs_rpc(op);
else
@@ -231,7 +225,6 @@ int afs_put_operation(struct afs_operation *op)
}
afs_end_cursor(&op->ac);
- afs_put_cb_interest(op->net, op->cbi);
afs_put_serverlist(op->net, op->server_list);
afs_put_volume(op->net, op->volume, afs_volume_trace_put_put_op);
kfree(op);