From patchwork Tue Dec 13 18:28:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinz Mauelshagen X-Patchwork-Id: 9472987 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4733460476 for ; Tue, 13 Dec 2016 18:36:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16C77285C9 for ; Tue, 13 Dec 2016 18:36:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A0DB285F8; Tue, 13 Dec 2016 18:36:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B4B93285C9 for ; Tue, 13 Dec 2016 18:36:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id uBDIZAaT021640; Tue, 13 Dec 2016 13:35:10 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id uBDIZ9Zk004337 for ; Tue, 13 Dec 2016 13:35:09 -0500 Received: from o.ww.redhat.com (ovpn-204-129.brq.redhat.com [10.40.204.129]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBDIZ7UP023441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 13 Dec 2016 13:35:09 -0500 Received: from o.ww.redhat.com (localhost.localdomain [127.0.0.1]) by o.ww.redhat.com (8.15.2/8.15.2) with ESMTP id uBDIZ72x022240; Tue, 13 Dec 2016 19:35:07 +0100 Received: (from mauelsha@localhost) by o.ww.redhat.com (8.15.2/8.15.2/Submit) id uBDISuup021788; Tue, 13 Dec 2016 19:28:56 +0100 From: Heinz Mauelshagen To: dm-devel@redhat.com Date: Tue, 13 Dec 2016 19:28:52 +0100 Message-Id: <20161213182852.21749-1-heinzm@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: dm-devel@redhat.com Cc: Heinz Mauelshagen Subject: [dm-devel] [PATCH] dm raid: change raid4/5/6 journal device status health char to 'A' rather than 'J' X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP There's no need to create a tautology by introducing a new device health char 'J', because the position of the status line field uniquely defines the char refering to the journal. This patch is on top of "[PATCH v2] dm raid: add raid4/5/6 journaling support" dated 11/30/2016. Related: rhbz1400194 Signed-off-by: Heinz Mauelshagen --- Documentation/device-mapper/dm-raid.txt | 2 +- drivers/md/dm-raid.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt index 67f69b2..8e6d910 100644 --- a/Documentation/device-mapper/dm-raid.txt +++ b/Documentation/device-mapper/dm-raid.txt @@ -254,7 +254,7 @@ recovery. Here is a fuller description of the individual fields: The current data offset to the start of the user data on each component device of a raid set (see the respective raid parameter to support out-of-place reshaping). - 'J' - active raid4/5/6 journal device. + 'A' - active raid4/5/6 journal device. 'D' - dead journal device. '-' - no journal device. diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 215285b..25bb5ab 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -3170,17 +3170,16 @@ static const char *decipher_sync_action(struct mddev *mddev) * * Status characters: * - * 'D' = Dead/Failed device + * 'D' = Dead/Failed raid set component or raid4/5/6 journal device * 'a' = Alive but not in-sync - * 'A' = Alive and in-sync - * 'J' = Journal device (raid4/5/6) + * 'A' = Alive and in-sync raid set component or alive raid4/5/6 journal device */ static const char *__raid_dev_status(struct md_rdev *rdev, bool array_in_sync) { if (test_bit(Faulty, &rdev->flags)) return "D"; else if (test_bit(Journal, &rdev->flags)) - return "J"; + return "A"; else if (!array_in_sync || !test_bit(In_sync, &rdev->flags)) return "a"; else