[Devel] [PATCH RHEL7 COMMIT] ploop: move to standby mode after fsync() error too

Konstantin Khorenko khorenko at virtuozzo.com
Tue Nov 20 13:11:08 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 7d5df8ad0cb2ee138b42683fcd986c89572f462a
Author: Anton Nefedov <anton.nefedov at virtuozzo.com>
Date:   Fri Nov 16 12:46:28 2018 +0300

    ploop: move to standby mode after fsync() error too
    
    Extend bdadef81aba5 'ploop: add a standby mode' so it covers fsync().
    
    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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 03d5a471b310..52d3e542fe19 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -524,6 +524,7 @@ static int kaio_fsync_thread(void * data)
 				       "on ploop%d)\n",
 				       err, io->files.inode->i_ino,
 				       io2level(io), plo->index);
+				check_standby_mode(err, plo);
 				PLOOP_REQ_SET_ERROR(preq, -EIO);
 			} else if (preq->req_rw & REQ_FLUSH) {
 				BUG_ON(!preq->req_size);



More information about the Devel mailing list