From b126bd7ff837110f4d08656609dda2244e485a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E8=BE=8910144360?= Date: Fri, 1 Mar 2019 16:26:09 +0800 Subject: [PATCH] runner:fix the ret when reopen dev failed in cmd stpg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if the device with the successful close() but failed open() in tcmu_acquire_dev_lock,after the cmd stpg failed,the device will never reopen again。so change the ret from TCMU_STS_FENCED to TCMU_STS_TIMEOUT,let the device into the recovery list. Signed-off-by: 李明辉10144360 --- tcmur_device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcmur_device.c b/tcmur_device.c index 45746755..f2294739 100644 --- a/tcmur_device.c +++ b/tcmur_device.c @@ -393,8 +393,7 @@ int tcmu_acquire_dev_lock(struct tcmu_device *dev, uint16_t tag) if (ret) { tcmu_dev_err(dev, "Could not reopen device while taking lock. Err %d.\n", ret); - /* We were fenced and were not able to clear it. */ - ret = TCMU_STS_FENCED; + ret = TCMU_STS_TIMEOUT; goto drop_conn; } }