From: viro@parcelfarce.linux.theplanet.co.uk
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: [RFCI] How best to partition MD/raid devices in 2.6
Date: Fri, 14 Nov 2003 05:09:34 +0000 [thread overview]
Message-ID: <20031114050934.GI24159@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <16308.18387.142415.469027@notabene.cse.unsw.edu.au>
On Fri, Nov 14, 2003 at 02:11:15PM +1100, Neil Brown wrote:
> This patch declares a new major number and uses it to address upto 15
> partitions on each of the first 16 md arrays.
> Not only does this limit you do only partitioning 16 md arrays, but
> it means that there are two separate devices (major+minor) that
> access the same device. In 2.4 this is just untidy. In 2.6 it would
> also subvert the exclusive access provided by bd_claim, and that
> isn't a good thing.
It breaks all sorts of exclusions common for 2.4 and 2.6.
> 2/ new major number which uses 6 bits for partitioning and provide
> some sort of interlock so that you cannot access the same raid
> array from both the old and the new major at the same time.
> I'm not sure how easy the interlock would be, but it is probably
> do-able. The problem is that I would like a well-defined major
Very painful.
> number and Linus doesn't seem keen on any more of those (though I
> realise that isn't unanimous).
> There was once talk of a 'disk' major number and all the things
> that looked like discs would come under that somehow, but that
> doesn't seem to have eventuated. Maybe it should, but there would
> still be the interlock problem
Yup. And it won't be easy (if at all feasible).
> 3/ define minor numbers of block-major-9 that are larger than 255 to
> have 6 bits of partitioning information. i.e.
> 9,0 -> md0
> 9,1 -> md1
> ...
> 9,255 -> md255
> 9,256 -> md256
> 9,257 -> md256p1
> 9,257 -> md256p2
> ...
> 9,320 -> md257
> 9,321 -> md257p1
> ...
> This has least impact on other system and is in some ways simplest,
> but it has the problem of lack of uniformity. You wouldn't be able
> to partition md0, but that isn't a big problem as long as you can
> partition some md arrays.
That works and is trivial to implement.
> 4/ just use 'dm', or write a new 'md' module that can present a
> partition of a device. Then leave the setup to user-space.
> This is least impact on the kernel, but most impact on
> user-space. It would not be too hard to create a userspace tool
> that made most of this fairly transparent.
> Particularly if it was a new 'md' personality, userspace could
> then effectively decide how the minor numbers of block-major-9
> were used with respect to partitioning.
Maybe...
>
> There are probably other options and I would be happy to hear them.
> My personal preference is wavering between 4 (using md) and 2.
> Possibly I should learn more about how 'dm' could handle it for me..
(2) is going to be very nasty. Keep in mind that there is locking
based on having unique struct block_device. And entire area is not
too nice to start with - we still have lots of cleanup to do in 2.7.
Try it if you really want to, but I'd expect a lot of hard-to-plug
holes.
(3) is absolutely trivial - will take 10--30 lines in md.c.
No comments on (4).
next prev parent reply other threads:[~2003-11-14 5:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-14 3:11 Neil Brown
2003-11-14 5:09 ` viro [this message]
2003-11-14 5:32 ` Neil Brown
2003-11-14 5:21 ` Daniel Gryniewicz
2003-11-14 5:30 ` Neil Brown
2003-11-14 10:16 ` Lars Marowsky-Bree
2003-11-14 18:29 ` Jeff Garzik
2003-11-14 21:44 ` Matt Domsch
2003-11-14 22:45 ` viro
2003-11-17 0:46 ` Automatic Write Reallocation Enable, question? Guy
2003-11-14 5:27 ` [RFCI] How best to partition MD/raid devices in 2.6 Daniel Pittman
2003-11-14 6:10 ` viro
2003-11-14 7:39 ` Luca Berra
2003-11-14 8:04 ` Paul Jakma
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=20031114050934.GI24159@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/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
Powered by JetHome