All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@trained-monkey.org>
To: Doug Ledford <dledford@redhat.com>,
	Mateusz Kusiak <mateusz.kusiak@intel.com>,
	linux-raid@vger.kernel.org
Cc: colyli@suse.de
Subject: Re: [PATCH] Add RAID 1 chunksize test
Date: Wed, 6 Apr 2022 12:46:03 -0400	[thread overview]
Message-ID: <9653c1f1-1aae-3c5d-2a43-4cb3109392b0@trained-monkey.org> (raw)
In-Reply-To: <53bc131b71b7f94210e507eed93390b1b3899246.camel@redhat.com>

On 4/4/22 08:38, Doug Ledford wrote:
> On Mon, 2022-04-04 at 09:08 +0200, Mateusz Kusiak wrote:
>> Specifying chunksize for raid 1 is forbidden.
>> Add test for blocking raid 1 creation with chunksize.
>>
>> Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
>> ---
>>  tests/01r1create-chunk | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>  create mode 100644 tests/01r1create-chunk
>>
>> diff --git a/tests/01r1create-chunk b/tests/01r1create-chunk
>> new file mode 100644
>> index 00000000..717a5e5a
>> --- /dev/null
>> +++ b/tests/01r1create-chunk
>> @@ -0,0 +1,15 @@
>> +# RAID 1 volume, 2 disks, chunk 64
>> +# NEGATIVE test - creating raid 1 with chunksize specified is
>> forbidden
>> +
>> +num_disks=2
>> +level=1
>> +device_list="$dev0 $dev1"
>> +chunk=64
>> +
>> +# Create raid 1 with chunk 64k and fail
>> +if ! mdadm --create --run $md0 --auto=md --level=$level --
>> chunk=$chunk --raid-disks=$num_disks $device_list
>> +then
>> +       exit 0
>> +fi
>> +
>> +exit 1
> 
> This is a case of overkill IMO.  Chunk size with raid1 isn't really a
> problem and shouldn't result in mdadm refusing to work.  Chunk size with
> raid1 simply has no effect and should just be ignored with at most a
> warning by mdadm.

I agree with Doug here. I think a warning from mdadm that chunksize
makes no sense for raid1 would be good, but having a failed test over it
makes little sense. If anything the test should detect the warning is
happening.

Thanks,
Jes




  reply	other threads:[~2022-04-06 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04  7:08 [PATCH] Add RAID 1 chunksize test Mateusz Kusiak
2022-04-04 12:38 ` Doug Ledford
2022-04-06 16:46   ` Jes Sorensen [this message]
2022-04-07  7:09     ` Mariusz Tkaczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9653c1f1-1aae-3c5d-2a43-4cb3109392b0@trained-monkey.org \
    --to=jes@trained-monkey.org \
    --cc=colyli@suse.de \
    --cc=dledford@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=mateusz.kusiak@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.