From: David Howells <dhowells@redhat.com>
To: linux-afs@lists.infradead.org
Cc: linux-ext4@vger.kernel.org,
Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
Jeffrey Altman <jaltman@auristor.com>,
Dave Botsch <botsch@cnf.cornell.edu>,
dhowells@redhat.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 00/27] afs: Improvements
Date: Fri, 29 May 2020 22:59:59 +0100 [thread overview]
Message-ID: <159078959973.679399.15496997680826127470.stgit@warthog.procyon.org.uk> (raw)
Here's a set of patches to make a number of improvements to the AFS driver:
(1) Improve callback (ie. third party change notification) processing by:
(a) Relying more on the fact we're doing this under RCU and by using
fewer locks.
This involves making the inode hash table RCU safe and providing
some RCU-safe accessor functions. The search can then be done
without taking the inode_hash_lock. Care must be taken because
the object may be being deleted and no wait is made.
This is also used to improve Ext4's time updating. Konstantin
Khlebnikov said "For now, I've plugged this issue with try-lock in
ext4 lazy time update. This solution is much better."
(b) Moving to keeping volumes in a tree indexed by volume ID rather
than a flat list.
(c) Making the server and volume records logically part of the cell.
This means that a server record now points directly at the cell
and the tree of volumes is there. This removes an N:M mapping
table, simplifying things.
(2) Improve keeping NAT or firewall channels open for the server callbacks
to reach the client by actively polling the fileserver on a timed
basis, instead of only doing it when we have an operation to process.
(3) Improving detection of delayed or lost callbacks by including the
parent directory in the list of file IDs to be queried when doing a
bulk status fetch from lookup. We can then check to see if our copy
of the directory has changed under us without us getting notified.
(4) Determine aliasing of cells (such as a cell that is pointed to be a
DNS alias). This allows us to avoid having ambiguity due to
apparently different cells using the same volume and file servers.
(5) Improve the fileserver rotation to do more probing when it detects
that all of the addresses to a server are listed as non-responsive.
It's possible that an address that previously stopped responding has
become responsive again.
Beyond that, lay some foundations for making some calls asynchronous:
(1) Turn the fileserver cursor struct into a general operation struct and
hang the parameters off of that rather than keeping them in local
variables and hang results off of that rather than the call struct.
(2) Implement some general operation handling code and simplify the
callers of operations that affect a volume or a volume component (such
as a file). Most of the operation is now done by core code.
(3) Operations are supplied with a table of operations to issue different
variants of RPCs and to manage the completion, where all the required
data is held in the operation object, thereby allowing these to be
called from a workqueue.
(4) Put the standard "if (begin), while(select), call op, end" sequence
into a canned function that just emulates the current behaviour for
now.
There are also some fixes interspersed:
(1) Don't let the EACCES from ICMP6 mapping reach the user as such, since
it's confusing as to whether it's a filesystem error. Convert it to
EHOSTUNREACH.
(2) Don't use the epoch value acquired through probing a server. If we
have two servers with the same UUID but in different cells, it's hard
to draw conclusions from them having different epoch values.
(3) Don't interpret the argument to the CB.ProbeUuid RPC as a fileserver
UUID and look up a fileserver from it.
(4) Deal with servers in different cells having the same UUIDs. In the
event that a CB.InitCallBackState3 RPC is received, we have to break
the callback promises for every server record matching that UUID.
(5) Don't let afs_statfs return values that go below 0.
(6) Don't use running fileserver probe state to make server selection and
address selection decisions on. Only make decisions on final state as
the running state is cleared at the start of probing.
The patches are here:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-next
David
---
David Howells (1):
afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly
fs/afs/Makefile | 2 +
fs/afs/afs.h | 3 +-
fs/afs/afs_vl.h | 1 +
fs/afs/callback.c | 345 ++++--------
fs/afs/cell.c | 10 +-
fs/afs/cmservice.c | 67 +--
fs/afs/dir.c | 1253 ++++++++++++++++++++----------------------
fs/afs/dir_silly.c | 190 +++----
fs/afs/dynroot.c | 93 ++++
fs/afs/file.c | 62 ++-
fs/afs/flock.c | 114 ++--
fs/afs/fs_operation.c | 239 ++++++++
fs/afs/fs_probe.c | 339 +++++++++---
fs/afs/fsclient.c | 1295 +++++++++++++++++---------------------------
fs/afs/inode.c | 491 ++++++++---------
fs/afs/internal.h | 523 ++++++++++--------
fs/afs/main.c | 6 +-
fs/afs/proc.c | 42 +-
fs/afs/protocol_yfs.h | 2 +-
fs/afs/rotate.c | 443 ++++++---------
fs/afs/rxrpc.c | 45 +-
fs/afs/security.c | 8 +-
fs/afs/server.c | 299 ++++++----
fs/afs/server_list.c | 40 +-
fs/afs/super.c | 107 ++--
fs/afs/vl_alias.c | 384 +++++++++++++
fs/afs/vl_rotate.c | 4 +
fs/afs/vlclient.c | 146 ++++-
fs/afs/volume.c | 152 ++++--
fs/afs/write.c | 148 +++--
fs/afs/xattr.c | 300 +++++-----
fs/afs/yfsclient.c | 914 +++++++++++++------------------
fs/ext4/inode.c | 44 +-
fs/inode.c | 173 +++++-
include/linux/fs.h | 3 +
include/trace/events/afs.h | 111 +++-
net/rxrpc/peer_event.c | 3 +
net/rxrpc/proc.c | 6 +-
38 files changed, 4484 insertions(+), 3923 deletions(-)
create mode 100644 fs/afs/fs_operation.c
create mode 100644 fs/afs/vl_alias.c
next reply other threads:[~2020-05-29 22:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 21:59 David Howells [this message]
2020-05-29 22:00 ` [PATCH 01/27] vfs, afs, ext4: Make the inode hash table RCU searchable David Howells
2020-05-31 13:09 ` Al Viro
2020-05-31 14:20 ` David Howells
2020-05-29 22:00 ` [PATCH 02/27] rxrpc: Map the EACCES error produced by some ICMP6 to EHOSTUNREACH David Howells
2020-05-29 22:00 ` [PATCH 03/27] rxrpc: Adjust /proc/net/rxrpc/calls to display call->debug_id not user_ID David Howells
2020-05-29 22:00 ` [PATCH 04/27] afs: Always include dir in bulk status fetch from afs_do_lookup() David Howells
2020-05-29 22:00 ` [PATCH 05/27] afs: Use the serverUnique field in the UVLDB record to reduce rpc ops David Howells
2020-05-29 22:00 ` [PATCH 06/27] afs: Split the usage count on struct afs_server David Howells
2020-05-29 22:00 ` [PATCH 07/27] afs: Actively poll fileservers to maintain NAT or firewall openings David Howells
2020-05-29 22:01 ` [PATCH 08/27] afs: Show more information in /proc/net/afs/servers David Howells
2020-05-29 22:01 ` [PATCH 09/27] afs: Make callback processing more efficient David Howells
2020-05-29 22:01 ` [PATCH 10/27] afs: Set error flag rather than return error from file status decode David Howells
2020-05-29 22:01 ` [PATCH 11/27] afs: Remove the error argument from afs_protocol_error() David Howells
2020-05-29 22:01 ` [PATCH 12/27] afs: Rename struct afs_fs_cursor to afs_operation David Howells
2020-05-29 22:01 ` [PATCH 13/27] afs: Build an abstraction around an "operation" concept David Howells
2020-05-29 22:01 ` [PATCH 14/27] afs: Don't get epoch from a server because it may be ambiguous David Howells
2020-05-29 22:01 ` [PATCH 15/27] afs: Fix handling of CB.ProbeUuid cache manager op David Howells
2020-05-29 22:02 ` [PATCH 16/27] afs: Retain more of the VLDB record for alias detection David Howells
2020-05-29 22:02 ` [PATCH 17/27] afs: Implement client support for the YFSVL.GetCellName RPC op David Howells
2020-05-29 22:02 ` [PATCH 18/27] afs: Detect cell aliases 1 - Cells with root volumes David Howells
2020-06-06 1:58 ` Kees Cook
2020-05-29 22:02 ` [PATCH 19/27] afs: Detect cell aliases 2 - Cells with no " David Howells
2020-05-29 22:02 ` [PATCH 20/27] afs: Detect cell aliases 3 - YFS Cells with a canonical cell name op David Howells
2020-05-29 22:02 ` [PATCH 21/27] afs: Add a tracepoint to track the lifetime of the afs_volume struct David Howells
2020-05-29 22:02 ` [PATCH 22/27] afs: Reorganise volume and server trees to be rooted on the cell David Howells
2020-05-29 22:02 ` [PATCH 23/27] afs: Fix the by-UUID server tree to allow servers with the same UUID David Howells
2020-05-29 22:02 ` [PATCH 24/27] afs: Fix afs_statfs() to not let the values go below zero David Howells
2020-05-29 22:03 ` [PATCH 25/27] afs: Don't use probe running state to make decisions outside probe code David Howells
2020-05-29 22:03 ` [PATCH 26/27] afs: Show more a bit more server state in /proc/net/afs/servers David Howells
2020-05-29 22:03 ` [PATCH 27/27] afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=159078959973.679399.15496997680826127470.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=botsch@cnf.cornell.edu \
--cc=jaltman@auristor.com \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-afs@lists.infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).