linux-stable/fs/afs
David Howells 20b8391fff afs: Make some RPC operations non-interruptible
Make certain RPC operations non-interruptible, including:

 (*) Set attributes
 (*) Store data

     We don't want to get interrupted during a flush on close, flush on
     unlock, writeback or an inode update, leaving us in a state where we
     still need to do the writeback or update.

 (*) Extend lock
 (*) Release lock

     We don't want to get lock extension interrupted as the file locks on
     the server are time-limited.  Interruption during lock release is less
     of an issue since the lock is time-limited, but it's better to
     complete the release to avoid a several-minute wait to recover it.

     *Setting* the lock isn't a problem if it's interrupted since we can
      just return to the user and tell them they were interrupted - at
      which point they can elect to retry.

 (*) Silly unlink

     We want to remove silly unlink files if we can, rather than leaving
     them for the salvager to clear up.

Note that whilst these calls are no longer interruptible, they do have
timeouts on them, so if the server stops responding the call will fail with
something like ETIME or ECONNRESET.

Without this, the following:

	kAFS: Unexpected error from FS.StoreData -512

appears in dmesg when a pending store data gets interrupted and some
processes may just hang.

Additionally, make the code that checks/updates the server record ignore
failure due to interruption if the main call is uninterruptible and if the
server has an address list.  The next op will check it again since the
expiration time on the old list has past.

Fixes: d2ddc776a4 ("afs: Overhaul volume and server record caching and fileserver rotation")
Reported-by: Jonathan Billings <jsbillings@jsbillings.org>
Reported-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
2019-05-16 16:25:20 +01:00
..
addr_list.c dns_resolver: Allow used keys to be invalidated 2019-05-15 17:35:54 +01:00
afs.h afs: Fix the maximum lifespan of VL and probe calls 2019-05-16 16:25:20 +01:00
afs_cm.h
afs_fs.h afs: implement acl setting 2019-05-07 16:48:44 +01:00
afs_vl.h afs: Make use of the YFS service upgrade to fully support IPv6 2017-11-13 15:38:19 +00:00
cache.c afs: Increase to 64-bit volume ID and 96-bit vnode ID for YFS 2018-10-24 00:41:08 +01:00
callback.c afs: Fix in-progess ops to ignore server-level callback invalidation 2019-04-13 08:37:37 +01:00
cell.c afs: Fix cell DNS lookup 2019-05-16 12:58:23 +01:00
cmservice.c Wimplicit-fallthrough patches for 5.2-rc1 2019-05-07 12:48:10 -07:00
dir.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
dir_edit.c afs: Locally edit directory data for mkdir/create/unlink/... 2018-04-09 21:54:48 +01:00
dir_silly.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
dynroot.c dns_resolver: Allow used keys to be invalidated 2019-05-15 17:35:54 +01:00
file.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
flock.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
fs_probe.c afs: Split wait from afs_make_call() 2019-04-25 14:26:50 +01:00
fsclient.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
inode.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
internal.h afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
Kconfig afs: Allow dumping of server cursor on operation failure 2018-10-24 00:41:09 +01:00
main.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
Makefile afs: Implement sillyrename for unlink and rename 2019-04-25 14:26:51 +01:00
misc.c afs: Mark expected switch fall-throughs 2019-04-08 18:35:56 -05:00
mntpt.c afs: Use fs_context to pass parameters over automount 2019-02-28 03:29:39 -05:00
netdevices.c afs: Implement network namespacing 2018-05-23 12:01:15 +01:00
proc.c afs: Fix afs_cell records to always have a VL server list record 2019-05-15 17:35:53 +01:00
protocol_yfs.h afs: Get YFS ACLs and information through xattrs 2019-05-07 16:48:44 +01:00
rotate.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
rxrpc.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
security.c afs: Fix callback handling 2018-10-24 00:41:09 +01:00
server.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
server_list.c afs: Use struct_size() in kzalloc() 2019-01-10 17:12:05 +00:00
super.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
vl_list.c afs: Fix afs_cell records to always have a VL server list record 2019-05-15 17:35:53 +01:00
vl_probe.c afs: Split wait from afs_make_call() 2019-04-25 14:26:50 +01:00
vl_rotate.c afs: Fix cell DNS lookup 2019-05-16 12:58:23 +01:00
vlclient.c afs: Fix the maximum lifespan of VL and probe calls 2019-05-16 16:25:20 +01:00
volume.c afs: Add fs_context support 2019-02-28 03:29:38 -05:00
write.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
xattr.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00
xdr_fs.h afs: Adjust the directory XDR structures 2018-04-09 21:54:48 +01:00
yfsclient.c afs: Make some RPC operations non-interruptible 2019-05-16 16:25:20 +01:00