linux-stable/fs/afs
David Howells 811f04bac1 afs: Fix interruption of operations
The afs filesystem driver allows unstarted operations to be cancelled by
signal, but most of these can easily be restarted (mkdir for example).  The
primary culprits for reproducing this are those applications that use
SIGALRM to display a progress counter.

File lock-extension operation is marked uninterruptible as we have a
limited time in which to do it, and the release op is marked
uninterruptible also as if we fail to unlock a file, we'll have to wait 20
mins before anyone can lock it again.

The store operation logs a warning if it gets interruption, e.g.:

	kAFS: Unexpected error from FS.StoreData -4

because it's run from the background - but it can also be run from
fdatasync()-type things.  However, store options aren't marked
interruptible at the moment.

Fix this in the following ways:

 (1) Mark store operations as uninterruptible.  It might make sense to
     relax this for certain situations, but I'm not sure how to make sure
     that background store ops aren't affected by signals to foreground
     processes that happen to trigger them.

 (2) In afs_get_io_locks(), where we're getting the serialisation lock for
     talking to the fileserver, return ERESTARTSYS rather than EINTR
     because a lot of the operations (e.g. mkdir) are restartable if we
     haven't yet started sending the op to the server.

Fixes: e49c7b2f6d ("afs: Build an abstraction around an "operation" concept")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-07-15 15:49:04 -07:00
..
Kconfig docs: filesystems: fix renamed references 2020-04-20 15:45:22 -06:00
Makefile afs: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
addr_list.c afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t 2020-03-13 10:47:33 -07:00
afs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
afs_cm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_vl.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
cache.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
callback.c afs: Fix the by-UUID server tree to allow servers with the same UUID 2020-06-04 15:37:57 +01:00
cell.c afs: Fix storage of cell names 2020-06-27 22:04:24 -07:00
cmservice.c afs: Fix handling of CB.ProbeUuid cache manager op 2020-06-04 15:37:57 +01:00
dir.c afs: Fix afs_do_lookup() to call correct fetch-status op variant 2020-06-20 12:01:58 -07:00
dir_edit.c afs: Remove set but not used variables 'before', 'after' 2019-11-21 20:36:00 +00:00
dir_silly.c afs: Fix silly rename 2020-06-16 22:00:28 +01:00
dynroot.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
file.c afs: Fix use of afs_check_for_remote_deletion() 2020-06-16 16:26:57 +01:00
flock.c afs: Fix use of afs_check_for_remote_deletion() 2020-06-16 16:26:57 +01:00
fs_operation.c afs: Fix interruption of operations 2020-07-15 15:49:04 -07:00
fs_probe.c afs: Fix hang on rmmod due to outstanding timer 2020-06-20 12:01:58 -07:00
fsclient.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
inode.c afs: Fix silly rename 2020-06-16 22:00:28 +01:00
internal.h afs: Fix storage of cell names 2020-06-27 22:04:24 -07:00
main.c afs: Fix hang on rmmod due to outstanding timer 2020-06-20 12:01:58 -07:00
misc.c afs: Fix the mapping of the UAEOVERFLOW abort code 2020-06-15 15:41:03 +01:00
mntpt.c afs: Fix mountpoint parsing 2019-12-11 16:56:54 +00:00
proc.c afs: Fix memory leak in afs_put_sysnames() 2020-06-09 15:22:06 +01:00
protocol_uae.h afs: Add support for the UAE error table 2019-06-28 18:37:53 +01:00
protocol_yfs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
rotate.c afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly 2020-06-04 15:37:58 +01:00
rxrpc.c AFS Changes 2020-06-05 16:26:36 -07:00
security.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
server.c afs: Fix hang on rmmod due to outstanding timer 2020-06-20 12:01:58 -07:00
server_list.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
super.c afs: Fix afs_statfs() to not let the values go below zero 2020-06-04 15:37:58 +01:00
vl_alias.c afs: Fix debugging statements with %px to be %p 2020-06-09 18:17:14 +01:00
vl_list.c fs/afs: Replace rcu_swap_protected() with rcu_replace_pointer() 2019-10-30 08:44:27 -07:00
vl_probe.c rxrpc: Fix the excessive initial retransmission timeout 2020-05-11 16:42:28 +01:00
vl_rotate.c afs: Detect cell aliases 3 - YFS Cells with a canonical cell name op 2020-06-04 15:37:57 +01:00
vlclient.c afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
volume.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
write.c afs: Fix interruption of operations 2020-07-15 15:49:04 -07:00
xattr.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
xdr_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
yfsclient.c afs: Fix yfs_fs_fetch_status() to honour vnode selector 2020-06-16 16:26:57 +01:00