ploop: kaio: Enter standby mode also on EIO

Submitted by Kirill Tkhai on April 17, 2019, 1:26 p.m.

Details

Message ID 155550759155.14730.6317442067433884492.stgit@localhost.localdomain
State New
Series "ploop: kaio: Enter standby mode also on EIO"
Headers show

Commit Message

Kirill Tkhai April 17, 2019, 1:26 p.m.
vstorage may return EIO on lease lose (in addition to EBUSY
and ENOTCONN). It's difficult to make vstorage and fastpath
to return only EBUSY and ENOTCONN in such situations.

So, Andrei suggested to ented standby mode on EIO too.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/io_kaio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 6882f921d069..5b97ed73611e 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -114,7 +114,7 @@  static void check_standby_mode(long res, struct ploop_device *plo) {
 	int prev;
 
 	/* move to standby if delta lease was stolen or mount is gone */
-	if (res != -EBUSY && res != -ENOTCONN) {
+	if (res != -EBUSY && res != -ENOTCONN && res != -EIO) {
 		return;
 	}
 

Comments

Andrey Zaitsev April 17, 2019, 1:45 p.m.
ok for me

17.04.2019 16:26, Kirill Tkhai пишет:
> vstorage may return EIO on lease lose (in addition to EBUSY
> and ENOTCONN). It's difficult to make vstorage and fastpath
> to return only EBUSY and ENOTCONN in such situations.
>
> So, Andrei suggested to ented standby mode on EIO too.
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>   drivers/block/ploop/io_kaio.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
> index 6882f921d069..5b97ed73611e 100644
> --- a/drivers/block/ploop/io_kaio.c
> +++ b/drivers/block/ploop/io_kaio.c
> @@ -114,7 +114,7 @@ static void check_standby_mode(long res, struct ploop_device *plo) {
>   	int prev;
>   
>   	/* move to standby if delta lease was stolen or mount is gone */
> -	if (res != -EBUSY && res != -ENOTCONN) {
> +	if (res != -EBUSY && res != -ENOTCONN && res != -EIO) {
>   		return;
>   	}
>   
>