From: "heming.zhao@suse.com" <heming.zhao@suse.com>
To: linux-raid@vger.kernel.org, song@kernel.org
Cc: guoqing.jiang@cloud.ionos.com, lidong.zhong@suse.com,
xni@redhat.com, neilb@suse.de, colyli@suse.com
Subject: Re: [PATCH] md: don't create mddev in md_open
Date: Tue, 30 Mar 2021 16:28:37 +0800 [thread overview]
Message-ID: <159d5840-836e-b85e-5b72-d152e4bfc608@suse.com> (raw)
In-Reply-To: <1617090209-18648-1-git-send-email-heming.zhao@suse.com>
On 3/30/21 3:43 PM, Zhao Heming wrote:
> commit d3374825ce57 ("md: make devices disappear when they are no longer
> needed.") introduced protection between mddev creating & removing. The
> md_open shouldn't create mddev when all_mddevs list doesn't contain
> mddev. With currently code logic, there will be very easy to trigger
> soft lockup in non-preempt env.
>
> *** env ***
> kvm-qemu VM 2C1G with 2 iscsi luns
> kernel should be non-preempt
>
> *** script ***
>
> about trigger 1 time with 10 tests
>
> ```
> 1 node1="15sp3-mdcluster1"
> 2 node2="15sp3-mdcluster2"
> 3
> 4 mdadm -Ss
> 5 ssh ${node2} "mdadm -Ss"
> 6 wipefs -a /dev/sda /dev/sdb
> 7 mdadm -CR /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sda \
> /dev/sdb --assume-clean
> 8
> 9 for i in {1..100}; do
> 10 echo ==== $i ====;
> 11
> 12 echo "test ...."
> 13 ssh ${node2} "mdadm -A /dev/md0 /dev/sda /dev/sdb"
> 14 sleep 1
> 15
> 16 echo "clean ....."
> 17 ssh ${node2} "mdadm -Ss"
> 18 done
> ```
>
the non-clustered test script. (again: run on non-preempt kernel)
```
#!/bin/bash
mdadm -Ss
wipefs -a /dev/sda /dev/sdb
mdadm -CR /dev/md0 -b internal -e 1.2 -n 2 -l mirror /dev/sda /dev/sdb --assume-clean
sleep 5
mdadm -Ss
for i in {1..200}; do
echo ==== $i ====;
echo "test ...."
mdadm -A /dev/md0 /dev/sda /dev/sdb
sleep 1
echo "clean ....."
mdadm -Ss
done
```
the value N on "/sys/module/md_mod/parameters/create_on_open" is useless.
Thanks,
heming
next prev parent reply other threads:[~2021-03-30 8:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 7:43 [PATCH] md: don't create mddev in md_open Zhao Heming
2021-03-30 8:28 ` heming.zhao [this message]
2021-03-31 6:55 ` Christoph Hellwig
2021-03-31 16:42 ` heming.zhao
2021-03-31 22:46 ` Song Liu
2021-04-01 0:43 ` heming.zhao
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=159d5840-836e-b85e-5b72-d152e4bfc608@suse.com \
--to=heming.zhao@suse.com \
--cc=colyli@suse.com \
--cc=guoqing.jiang@cloud.ionos.com \
--cc=lidong.zhong@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=song@kernel.org \
--cc=xni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox