From nobody Fri Feb 16 05:24:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TbgNm5xgYz59mlb; Fri, 16 Feb 2024 05:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TbgNm5RxGz4YGn; Fri, 16 Feb 2024 05:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708061096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d7c3csSrlDCamk8skKb6eWNKGn8Pv82rr9SdSJvm53M=; b=GoQrCzrbMkPPgFvt7zPiCUcnfGlHugpUQd34W8Gt4ePDx9zdxkQDv2IGRpve1A4kIv4w8m DCT98ggBJjdmzLzFck5FPUlIZMDNpRptsgWuZ9RVZuB8BPjpsTjMAR14UHDs1CvGCKhddh TvdSMO8SqsIdsP3MvM96VjDUz9xcrzxGICXi37idpV2AYZg7plzhQS6VIbVmdtmybKLn5U 9saLmfzCC4+dMY5xq4CLN7m9hSl57wbVgsQoTYK1iG1z59qWgFayCZgSFd5Z/Q/FxA+/Yd 7u0lS0Wbz+Zkrb+Dm+iFGi0J3BD3WsXQPUdCU1fNS3S0ImIQ54TxLjvcvsR9bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708061096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d7c3csSrlDCamk8skKb6eWNKGn8Pv82rr9SdSJvm53M=; b=YB0F5greFifs3JxHpTs9+p9YeEvHrAbo3+qGX5FGq9uoOTSBmvNvF0W54I7eGcuU1WDjg3 oeFBosDfnIA4M1/hazcX3g35MLxepDoCJQozHlTwUN4jNjZzE582bhlicqHDF+WsPZAhyc gV5EGIY4I6PzTrA2m7EKsIIPyd326daMS2kotlNuGVt4rIa3qXvOPEUj1Q3NXn0+up5UDA 7OxafaOqb4FmqhX5DoiJY5x0t5eQswh/YKUtqDZWAls1jtcQP4w+VkJTScotbo+oOqcAZ0 wuH8kNmNqZ5N8zMxraLUbOpwgcMETvVE8BvtqXIYKeNAPSmOBeDKIv4Exg420Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708061096; a=rsa-sha256; cv=none; b=Dsg0S8ZZskiec2EVT43fwwiJgowen7pUMs2HUqFWpp0knZL4yhw0FOIs789L83vnT675tA o3w6zply5TA0GdZkW2eCJ4I+xv6wgVeIEp8LpVR9tUiZJo4HxahaJTu+e8wqdcjxDUDDGZ m3HHdXn5oJaqEDoEo4L/N55CE26P2BtbDyGK8CYY/OWuCQoAUTCj8gqTWxtaxs8Zebx2qs 6hnAfxmQNfH3fdlgS6U+BbOKHWyLgMkRNEi/Eov34eZLVNBAnfsz++BfGFWeHUpndHP3zX Z3apEmFW+65/JMHjmXaSXekVs6kazl/fgQitZ6bAzlAH/V2fhks1/NILjPLRgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TbgNm4Vynz1Blk; Fri, 16 Feb 2024 05:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41G5OuEn062568; Fri, 16 Feb 2024 05:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41G5OuMB062565; Fri, 16 Feb 2024 05:24:56 GMT (envelope-from git) Date: Fri, 16 Feb 2024 05:24:56 GMT Message-Id: <202402160524.41G5OuMB062565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 77814c95994a - stable/13 - graid: MFC: unbreak Promise RAID1 with 4+ providers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 77814c95994aab102be0e327de788dc1c00c023d Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=77814c95994aab102be0e327de788dc1c00c023d commit 77814c95994aab102be0e327de788dc1c00c023d Author: Eugene Grosbein AuthorDate: 2024-02-12 07:24:28 +0000 Commit: Eugene Grosbein CommitDate: 2024-02-16 05:24:32 +0000 graid: MFC: unbreak Promise RAID1 with 4+ providers Fix a problem in graid implementation of Promise RAID1 created with 4+ disks. Such an array generally works fine until reboot only due to a bug in metadata writing code. Before the fix, next taste erronously created RAID1E (kind of RAID10) instead of RAID1, hence graid used wrong offsets for I/O operations. The bug did not affect Promise RAID1 arrays with 2 or 3 disks only. Reviewed by: mav (cherry picked from commit 81092e92ea5184c4eeedad58044d72cfef72dd24) --- sys/geom/raid/md_promise.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/geom/raid/md_promise.c b/sys/geom/raid/md_promise.c index 1c22c0756dfd..da2ea3d7da4e 100644 --- a/sys/geom/raid/md_promise.c +++ b/sys/geom/raid/md_promise.c @@ -1763,8 +1763,9 @@ g_raid_md_write_promise(struct g_raid_md_object *md, struct g_raid_volume *tvol, meta->total_disks = vol->v_disks_count; meta->stripe_shift = ffs(vol->v_strip_size / 1024); meta->array_width = vol->v_disks_count; - if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1 || - vol->v_raid_level == G_RAID_VOLUME_RL_RAID1E) + if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1) + meta->array_width = 1; + else if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1E) meta->array_width /= 2; meta->array_number = vol->v_global_id; meta->total_sectors = vol->v_mediasize / 512;