diff mbox series

[13/41] afs: Handle the VIO abort explicitly

Message ID 20231109154004.3317227-14-dhowells@redhat.com (mailing list archive)
State New, archived
Headers show
Series afs: Fix probe handling, server rotation and RO volume callback handling | expand

Commit Message

David Howells Nov. 9, 2023, 3:39 p.m. UTC
When processing the result of a call, handle the VIO abort specifically
rather than leaving it to a default case.  Rather than erroring out
unconditionally, see if there's another server if the volume has more than
one server available, otherwise return -EREMOTEIO.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
---
 fs/afs/rotate.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jeffrey E Altman Nov. 9, 2023, 6:12 p.m. UTC | #1
On 11/9/2023 10:39 AM, David Howells wrote:
> When processing the result of a call, handle the VIO abort specifically
> rather than leaving it to a default case.  Rather than erroring out
> unconditionally, see if there's another server if the volume has more than
> one server available, otherwise return -EREMOTEIO.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Marc Dionne <marc.dionne@auristor.com>
> cc: linux-afs@lists.infradead.org
> ---
>   fs/afs/rotate.c | 6 ++++++
>   1 file changed, 6 insertions(+)

OpenAFS fileservers can return VIO (112) either during an attempt to 
load a vnode or to store a vnode. However, most IBM AFS derived cache 
managers do not explicitly handle VIO errors and pass them to the vfs to 
be interpreted as a local operating system error. For Linux that means 
EHOSTDOWN. Therefore, AuriStorFS fileservers return UAEIO instead.

Please modify this patch to handle UAEIO the same as VIO.

Thank you.

Jeffrey Altman
diff mbox series

Patch

diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c
index 0f59f2a81f23..342afc951fe4 100644
--- a/fs/afs/rotate.c
+++ b/fs/afs/rotate.c
@@ -329,6 +329,12 @@  bool afs_select_fileserver(struct afs_operation *op)
 
 			goto restart_from_beginning;
 
+		case VIO:
+			op->error = -EREMOTEIO;
+			if (op->volume->type != AFSVL_RWVOL)
+				goto next_server;
+			goto failed;
+
 		case VDISKFULL:
 		case UAENOSPC:
 			/* The partition is full.  Only applies to RWVOLs.