From patchwork Thu Jun 9 21:11:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 12875988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AAB5C433EF for ; Thu, 9 Jun 2022 21:11:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345413AbiFIVLx (ORCPT ); Thu, 9 Jun 2022 17:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345378AbiFIVLo (ORCPT ); Thu, 9 Jun 2022 17:11:44 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B772152D96 for ; Thu, 9 Jun 2022 14:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=9XsLn8P/ZHyuehC/8bpzEu5IbWvJqS53bLSU/ZPvPKU=; b=s1QW3WbWL+8VASJxylAET4vTEC JzP2O0pkqNlYA6G4xoq5S9cJh3xwgfInMArnMgF5iqrEzEOzOb29RW5AvrZkkgMMl8D8JKd8QHu4e 9emwKd8QOhOWhF/5RO4WXFpDJua0PxJi2ONxi/VaZHvsmk6RfnT2uxBg3FayFEmBaAqh9+KiBsi9x 2y2pq3uNwOZHc2dffODvw7+WezQOoxJsbsOgfAN+C48Ad4LffQ9tGY41iDeQg11PlyVLRMPO+re51 NprW0cOiyagIhkwsK0KMKN2q8aJqVo9DE/9dPZztq6I0NOYciKcevvPGxuPQQXRTzDdA68xK98G4r F7fzUGtg==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nzPRM-0037Xk-O8; Thu, 09 Jun 2022 15:11:42 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1nzPRF-0001Lr-A3; Thu, 09 Jun 2022 15:11:33 -0600 From: Logan Gunthorpe To: linux-raid@vger.kernel.org, Jes Sorensen Cc: Song Liu , Christoph Hellwig , Donald Buczek , Guoqing Jiang , Xiao Ni , Himanshu Madhani , Mariusz Tkaczyk , Coly Li , Bruce Dubbs , Stephen Bates , Martin Oliveira , David Sloan , Sudhakar Panneerselvam , Logan Gunthorpe Date: Thu, 9 Jun 2022 15:11:25 -0600 Message-Id: <20220609211130.5108-10-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220609211130.5108-1-logang@deltatee.com> References: <20220609211130.5108-1-logang@deltatee.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-raid@vger.kernel.org, jsorensen@fb.com, song@kernel.org, hch@infradead.org, buczek@molgen.mpg.de, guoqing.jiang@linux.dev, xni@redhat.com, mariusz.tkaczyk@linux.intel.com, colyli@suse.de, bruce.dubbs@gmail.com, sbates@raithlin.com, Martin.Oliveira@eideticom.com, David.Sloan@eideticom.com, himanshu.madhani@oracle.com, sudhakar.panneerselvam@oracle.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH mdadm v1 09/14] tests: fix raid0 tests for 0.90 metadata X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-raid@vger.kernel.org From: Sudhakar Panneerselvam Some of the test cases fail because raid0 creation fails with the error, "0.90 metadata does not support layouts for RAID0" added by commit, 329dfc28debb. Fix some of the test cases by switching from raid0 to linear level for 0.9 metadata where possible. Signed-off-by: Sudhakar Panneerselvam Signed-off-by: Himanshu Madhani Signed-off-by: Logan Gunthorpe --- tests/00raid0 | 4 ++-- tests/00readonly | 4 ++++ tests/03r0assem | 6 +++--- tests/04r0update | 4 ++-- tests/04update-metadata | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/00raid0 b/tests/00raid0 index e6b21cc419eb..9b8896cbdc52 100644 --- a/tests/00raid0 +++ b/tests/00raid0 @@ -20,8 +20,8 @@ mdadm -S $md0 # now same again with different chunk size for chunk in 4 32 256 do - mdadm -CR $md0 -e0.90 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2 - check raid0 + mdadm -CR $md0 -e0.90 -l linear --chunk $chunk -n3 $dev0 $dev1 $dev2 + check linear testdev $md0 3 $mdsize0 $chunk mdadm -S $md0 diff --git a/tests/00readonly b/tests/00readonly index 28b0fa13f815..39202487f614 100644 --- a/tests/00readonly +++ b/tests/00readonly @@ -4,6 +4,10 @@ for metadata in 0.9 1.0 1.1 1.2 do for level in linear raid0 raid1 raid4 raid5 raid6 raid10 do + if [[ $metadata == "0.9" && $level == "raid0" ]]; + then + continue + fi mdadm -CR $md0 -l $level -n 4 --metadata=$metadata \ $dev1 $dev2 $dev3 $dev4 --assume-clean check nosync diff --git a/tests/03r0assem b/tests/03r0assem index 6744e3221062..44df06456233 100644 --- a/tests/03r0assem +++ b/tests/03r0assem @@ -68,9 +68,9 @@ mdadm -S $md2 ### Now for version 0... mdadm --zero-superblock $dev0 $dev1 $dev2 -mdadm -CR $md2 -l0 --metadata=0.90 -n3 $dev0 $dev1 $dev2 -check raid0 -tst="testdev $md2 3 $mdsize0 512" +mdadm -CR $md2 -llinear --metadata=0.90 -n3 $dev0 $dev1 $dev2 +check linear +tst="testdev $md2 3 $mdsize0 1" $tst uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'` diff --git a/tests/04r0update b/tests/04r0update index 73ee3b9fed91..b95efb06c761 100644 --- a/tests/04r0update +++ b/tests/04r0update @@ -1,7 +1,7 @@ # create a raid0, re-assemble with a different super-minor -mdadm -CR -e 0.90 $md0 -l0 -n3 $dev0 $dev1 $dev2 -testdev $md0 3 $mdsize0 512 +mdadm -CR -e 0.90 $md0 -llinear -n3 $dev0 $dev1 $dev2 +testdev $md0 3 $mdsize0 1 minor1=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'` mdadm -S /dev/md0 diff --git a/tests/04update-metadata b/tests/04update-metadata index 232fc1ffff4b..08c14af7ed29 100644 --- a/tests/04update-metadata +++ b/tests/04update-metadata @@ -8,7 +8,7 @@ set -xe dlist="$dev0 $dev1 $dev2 $dev3" -for ls in raid0/4 linear/4 raid1/1 raid5/3 raid6/2 +for ls in linear/4 raid1/1 raid5/3 raid6/2 do s=${ls#*/} l=${ls%/*} mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist