diff options
author | David Howells <dhowells@redhat.com> | 2019-04-25 14:26:51 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-04-25 14:26:51 +0100 |
commit | cdfb26b40dfa51127d22d171cef4fe8993cbfb55 (patch) | |
tree | f113dc931a8677a31d9aa70e50953a2a08357cd3 /include | |
parent | 445b10289f766b73527ecb4fb4e388677ad93740 (diff) |
afs: Handle lock rpc ops failing on a file that got deleted
Holding a file lock on an AFS file does not prevent it from being deleted
on the server, so we need to handle an error resulting from that when we
try setting, extending or releasing a lock.
Fix this by adding a "deleted" lock state and cancelling the lock extension
process for that file and aborting all waiters for the lock.
Fixes: 0fafdc9f888b ("afs: Fix file locking")
Reported-by: Jonathan Billings <jsbillin@umich.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/afs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h index 24c058a93e8f..21b896fabb2f 100644 --- a/include/trace/events/afs.h +++ b/include/trace/events/afs.h @@ -156,9 +156,11 @@ enum afs_flock_event { afs_flock_acquired, afs_flock_callback_break, afs_flock_defer_unlock, + afs_flock_extend_fail, afs_flock_fail_other, afs_flock_fail_perm, afs_flock_no_lockers, + afs_flock_release_fail, afs_flock_timestamp, afs_flock_try_to_lock, afs_flock_vfs_lock, @@ -323,15 +325,18 @@ enum afs_flock_operation { EM(AFS_VNODE_LOCK_GRANTED, "GRANTED") \ EM(AFS_VNODE_LOCK_EXTENDING, "EXTENDING") \ EM(AFS_VNODE_LOCK_NEED_UNLOCK, "NEED_UNLOCK") \ - E_(AFS_VNODE_LOCK_UNLOCKING, "UNLOCKING") \ + EM(AFS_VNODE_LOCK_UNLOCKING, "UNLOCKING") \ + E_(AFS_VNODE_LOCK_DELETED, "DELETED") #define afs_flock_events \ EM(afs_flock_acquired, "Acquired") \ EM(afs_flock_callback_break, "Callback") \ EM(afs_flock_defer_unlock, "D-Unlock") \ + EM(afs_flock_extend_fail, "Ext_Fail") \ EM(afs_flock_fail_other, "ErrOther") \ EM(afs_flock_fail_perm, "ErrPerm ") \ EM(afs_flock_no_lockers, "NoLocker") \ + EM(afs_flock_release_fail, "Rel_Fail") \ EM(afs_flock_timestamp, "Timestmp") \ EM(afs_flock_try_to_lock, "TryToLck") \ EM(afs_flock_vfs_lock, "VFSLock ") \ |