Commit 7530d3eb authored by David Howells's avatar David Howells

afs: Don't assert on unpurgeable server records

Don't give an assertion failure on unpurgeable afs_server records - which
kills the thread - but rather emit a trace line when we are purging a
record (which only happens during network namespace removal or rmmod) and
print a notice of the problem.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent dca54a7b
...@@ -550,7 +550,12 @@ void afs_manage_servers(struct work_struct *work) ...@@ -550,7 +550,12 @@ void afs_manage_servers(struct work_struct *work)
_debug("manage %pU %u", &server->uuid, active); _debug("manage %pU %u", &server->uuid, active);
ASSERTIFCMP(purging, active, ==, 0); if (purging) {
trace_afs_server(server, atomic_read(&server->ref),
active, afs_server_trace_purging);
if (active != 0)
pr_notice("Can't purge s=%08x\n", server->debug_id);
}
if (active == 0) { if (active == 0) {
time64_t expire_at = server->unuse_time; time64_t expire_at = server->unuse_time;
......
...@@ -40,6 +40,7 @@ enum afs_server_trace { ...@@ -40,6 +40,7 @@ enum afs_server_trace {
afs_server_trace_get_new_cbi, afs_server_trace_get_new_cbi,
afs_server_trace_get_probe, afs_server_trace_get_probe,
afs_server_trace_give_up_cb, afs_server_trace_give_up_cb,
afs_server_trace_purging,
afs_server_trace_put_call, afs_server_trace_put_call,
afs_server_trace_put_cbi, afs_server_trace_put_cbi,
afs_server_trace_put_find_rsq, afs_server_trace_put_find_rsq,
...@@ -311,6 +312,7 @@ enum afs_cb_break_reason { ...@@ -311,6 +312,7 @@ enum afs_cb_break_reason {
EM(afs_server_trace_get_new_cbi, "GET cbi ") \ EM(afs_server_trace_get_new_cbi, "GET cbi ") \
EM(afs_server_trace_get_probe, "GET probe") \ EM(afs_server_trace_get_probe, "GET probe") \
EM(afs_server_trace_give_up_cb, "giveup-cb") \ EM(afs_server_trace_give_up_cb, "giveup-cb") \
EM(afs_server_trace_purging, "PURGE ") \
EM(afs_server_trace_put_call, "PUT call ") \ EM(afs_server_trace_put_call, "PUT call ") \
EM(afs_server_trace_put_cbi, "PUT cbi ") \ EM(afs_server_trace_put_cbi, "PUT cbi ") \
EM(afs_server_trace_put_find_rsq, "PUT f-rsq") \ EM(afs_server_trace_put_find_rsq, "PUT f-rsq") \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment