From nobody Tue Nov 18 07:42:43 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1608035591; cv=none; d=zohomail.com; s=zohoarc; b=WUstRGr9A1q4qYxLW5as3f/9HfLPArU4HEPy+Nwtq8/HD2NqDiKOGhIQ+H6skO/95yenC2HdW7H36KD0ymSMBALg/kLfCx/QamPmFU59vcYJwNJoKC+j4jhvgQYLh7GRHIwQcNdJLmAWMoR/qmoPDeu1yEG5J1RUZkiWHvjxO8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608035591; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Y+ymLtydSZHgwrvJi9uplc50zyCkzOcY26XaOX4PE9A=; b=ICXaQfofHMfh3t4AiaTmseC3IVleb2bOxzjFWl8E5pVdURDsNirE2saP8pLZoJgfWSxQlUEixbHgl6L/7JIjTlZdQe2ppDtwyVHWuFar1QYc840vnV39Q4FYECzG/8QYflx8maBWKoL5u7JiKVvu3PQ+WiUxHFT8udRBxxZ9Phk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608035591983565.0223148391547; Tue, 15 Dec 2020 04:33:11 -0800 (PST) Received: from localhost ([::1]:33740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kp9Vu-00015B-Lv for importer@patchew.org; Tue, 15 Dec 2020 07:33:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kp9Tc-0007kU-V2; Tue, 15 Dec 2020 07:30:48 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:2559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kp9TX-0006ru-UG; Tue, 15 Dec 2020 07:30:48 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CwHdj3SY1zhs6y; Tue, 15 Dec 2020 20:30:01 +0800 (CST) Received: from localhost (10.174.184.155) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Tue, 15 Dec 2020 20:30:24 +0800 From: Jiahui Cen To: Subject: [PATCH v4 1/7] qapi/block-core: Add retry option for error action Date: Tue, 15 Dec 2020 20:30:05 +0800 Message-ID: <20201215123011.4048-2-cenjiahui@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201215123011.4048-1-cenjiahui@huawei.com> References: <20201215123011.4048-1-cenjiahui@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.174.184.155] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.32; envelope-from=cenjiahui@huawei.com; helo=szxga06-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , cenjiahui@huawei.com, zhang.zhanghailiang@huawei.com, qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Max Reitz , Stefan Hajnoczi , fangying1@huawei.com, John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add a new error action 'retry' to support retry on errors. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- blockdev.c | 2 ++ qapi/block-core.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 412354b4b6..47c0e6db52 100644 --- a/blockdev.c +++ b/blockdev.c @@ -342,6 +342,8 @@ static int parse_block_error_action(const char *buf, bo= ol is_read, Error **errp) return BLOCKDEV_ON_ERROR_STOP; } else if (!strcmp(buf, "report")) { return BLOCKDEV_ON_ERROR_REPORT; + } else if (!strcmp(buf, "retry")) { + return BLOCKDEV_ON_ERROR_RETRY; } else { error_setg(errp, "'%s' invalid %s error action", buf, is_read ? "read" : "write"); diff --git a/qapi/block-core.json b/qapi/block-core.json index 04c5196e59..ef5492bcdf 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1146,7 +1146,7 @@ # Since: 1.3 ## { 'enum': 'BlockdevOnError', - 'data': ['report', 'ignore', 'enospc', 'stop', 'auto'] } + 'data': ['report', 'ignore', 'enospc', 'stop', 'auto', 'retry'] } =20 ## # @MirrorSyncMode: @@ -4770,7 +4770,7 @@ # Since: 2.1 ## { 'enum': 'BlockErrorAction', - 'data': [ 'ignore', 'report', 'stop' ] } + 'data': [ 'ignore', 'report', 'stop', 'retry' ] } =20 =20 ## --=20 2.28.0