[Devel] [PATCH RHEL7 COMMIT] ploop: move to standby after -ENOTCONN too

Konstantin Khorenko khorenko at virtuozzo.com
Tue Nov 20 13:11:57 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.20.2.vz7.73.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.20.2.vz7.73.6
------>
commit fb69449a531d4326d8208c10822751fe4b12594e
Author: Anton Nefedov <anton.nefedov at virtuozzo.com>
Date:   Fri Nov 16 12:46:29 2018 +0300

    ploop: move to standby after -ENOTCONN too
    
    For example vstorage-mount death results in -ENOTCONN error.
    
    https://pmc.acronis.com/browse/VSTOR-17613
    
    Signed-off-by: Anton Nefedov <anton.nefedov at virtuozzo.com>
    Acked-by: Andrey Zaitsev <azaitsev at virtuozzo.com>
    Acked-by: Sergey Lysanov <slysanov at virtuozzo.com>
    
    ===========================
    Patchset description:
    
    ploop: more cases for standby mode
    
    standby mode motivation:
    
      commit bdadef81aba572fdcfd59e4c5c7b18736c962ebd
      Author: Andrei Vagin <avagin at openvz.org>
      Date:   Thu Mar 1 11:07:34 2018 +0300
    
        ploop: add a standby mode
    
        This mode shows that a delta lease was stolen and it is impossible to
        handle any requests.
    
        We want to know about this situation from the iscsi target. When HA
        decides that the current target is broken, it can initialize another
        target with the same delta. In this case, the first target has to complete
        all in-porgress commands and set the ASCQ_04H_ALUA_TG_PT_STANDBY bit in
        their status.
    
        In Linux, bio-s are always completed with EIO in error cases, so we need
        another way how to determine this state. This patch addes a new block
        queue flag QUEUE_FLAG_STANDBY.
    
    Anton Nefedov (3):
      ploop: move standby mode setting to separate function
      ploop: move to standby mode after fsync() error too
      ploop: move to standby after -ENOTCONN too
---
 drivers/block/ploop/io_kaio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 52d3e542fe19..6089522f8f5a 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -113,8 +113,8 @@ static void check_standby_mode(long res, struct ploop_device *plo) {
 	struct request_queue *q = plo->queue;
 	int prev;
 
-	/* move to standby if delta lease was stolen */
-	if (res != -EBUSY) {
+	/* move to standby if delta lease was stolen or mount is gone */
+	if (res != -EBUSY && res != -ENOTCONN) {
 		return;
 	}
 



More information about the Devel mailing list