From patchwork Tue Oct 1 15:47:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinz Mauelshagen X-Patchwork-Id: 11169129 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBCD81599 for ; Tue, 1 Oct 2019 15:48:05 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE1FE2070B for ; Tue, 1 Oct 2019 15:48:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE1FE2070B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF578307CDC0; Tue, 1 Oct 2019 15:48:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 559075D712; Tue, 1 Oct 2019 15:48:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C29AB4A486; Tue, 1 Oct 2019 15:48:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x91Fm2uK002130 for ; Tue, 1 Oct 2019 11:48:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 336345D713; Tue, 1 Oct 2019 15:48:02 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from o.ww.redhat.com (ovpn-117-201.ams2.redhat.com [10.36.117.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4ABB95D712; Tue, 1 Oct 2019 15:47:56 +0000 (UTC) From: Heinz Mauelshagen To: heinzm@redhat.com, dm-devel@redhat.com, snitzer@redhat.com Date: Tue, 1 Oct 2019 17:47:51 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH 0/4] dm raid: fix raid set extensions not being synchronized 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: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 01 Oct 2019 15:48:05 +0000 (UTC) This patch series fixes flaws causing raid set extensions not to be synchronized in case a grown MD bitmap has to allocate additional pages. When a raid set's grown, additional pages in the MD write-intent bitmap may have to be allocated as a result. Because so far no md_bitmap_resize() occurs in that process, additional new regions (aka MD bitmap chunks) aren't set dirty during creation, thus they fail to be synchronized. Solve by using md_bitmap_resize() in raid set size extensions to ensure dirtying of additional, new regions. Also address another flaw causing new regions not to be synchronized after a raid set size reduction followed by an extension and streamline recovery setup and progress status functions. Passes all lvm2 test suite RAID tests. Heinz Mauelshagen (4): dm raid: change rs_set_dev_and_array_sectors API and callers dm raid: to ensure resynchronization, perform raid set grow in preresume dm raid: simplify rs_setup_recovery call chain dm raid: streamline rs_get_progress() and its raid_status() caller side .../admin-guide/device-mapper/dm-raid.rst | 2 + drivers/md/dm-raid.c | 168 ++++++++++-------- 2 files changed, 91 insertions(+), 79 deletions(-)