From: Dima Dvorcovoy <dvorc@bsu.by>
To: linux-raid@vger.kernel.org
Subject: remove mdadm stripe limitation, pls
Date: Mon, 31 Jul 2017 18:52:24 +0300 [thread overview]
Message-ID: <1501516344.23767.4.camel@bsu.by> (raw)
In-Reply-To: <S1752524AbdGaPpr/20170731154547Z+299@vger.kernel.org>
I got in trouble trying to mount RAID0 drives from brocen HW
controller. The mdadm utility is locked to 4k stripe minimum, but these
drives have 1s (512bytes) stripes.
Then, I dig into kernel and found there are no actual stripe limitation
seems. So, all the limits are in mdadm code. I patched soure and all
works ok.
mdadm --build /dev/md0 --level=0 --chunk=1s --raid-devices=2 /dev/sdd
/dev/sdc
First: there are UNDOCUCMENTED option in --chunk, size could be given
in sectors (s).
Second: 1s used as INVALID_SECTORS constant. I changed it to 0xffff
Third: The sector number is stored in K. I removes this division, maybe
it is only for output.
Where to connect with mdadm team to ask for changes? What I skipped to
patch?
[mdadm.h]
1737c1737
< * a value for 'invalid'. Use '1'.
---
> * a value for 'invalid'. Use '-1'.
1739c1739
< #define INVALID_SECTORS 1
---
> #define INVALID_SECTORS 0xffff
[mdadm.c]
381,384c381,382
< if (s.chunk == INVALID_SECTORS ||
< s.chunk < 8 || (s.chunk&1)) {
< pr_err("invalid chunk/rounding value: %s\n",
< optarg);
---
> if (s.chunk == INVALID_SECTORS) {
> pr_err("invalid chunk/rounding value: %s\n",optarg);
[Build.c]
387,388d384
< /* Convert sectors to K */
< s.chunk /= 2;
145c145
< array.chunk_size = s->chunk*1024;
---
> array.chunk_size = s->chunk*512;
[Create.c]
696c696
< info.array.chunk_size = s->chunk*1024;
---
> info.array.chunk_size = s->chunk*512;
next parent reply other threads:[~2017-07-31 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <S1752524AbdGaPpr/20170731154547Z+299@vger.kernel.org>
2017-07-31 15:52 ` Dima Dvorcovoy [this message]
2017-07-31 17:00 ` remove mdadm stripe limitation, pls Shaohua Li
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=1501516344.23767.4.camel@bsu.by \
--to=dvorc@bsu.by \
--cc=linux-raid@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).