linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE>
Cc: linux-raid@vger.kernel.org
Subject: Re: Why is sb->size set to 0 with raid0?
Date: Thu, 22 Jul 2010 15:34:56 +1000	[thread overview]
Message-ID: <20100722153456.04f751e7@notabene> (raw)
In-Reply-To: <slrni4e7bi.ced.Mario.Holbe@darkside.dyn.samba-tng.org>

On Wed, 21 Jul 2010 18:16:46 +0200
Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE> wrote:

> Hello,
> 
> while examining a raid0 v1.2 superblock I found "Used Dev Size" seems
> not to be set there, mdadm -E on a component device shows:
> 	          Magic : a92b4efc
> 	        Version : 1.2
> 	    Feature Map : 0x0
> 	...
> 	 Avail Dev Size : 2930274824 (1397.26 GiB 1500.30 GB)
> 	  Used Dev Size : 0
> 	    Data Offset : 16 sectors
> 	   Super Offset : 8 sectors
> 	          State : clean
> 
> Is this intentional?
> This is just to let you know and for my curiosity. I don't know whether
> this has negative side-effects or not. I found none until now.
> 
> Don't get me wrong, I like the (IMHO positive) side-effect of this: it
> makes totally sense to me, not to reserve bitmap-space for raid0 - I
> even downgraded to mdadm 3.1.1 for raid creation to get rid of the 1M
> alignment, and I was short thinking about patching super1.c for this
> array to get rid of the bitmap-space reservation as well.
> Thus, I was just positively surprised to see that in fact there *is* no
> bitmap-space reserved for raid0, wondered how and where this was
> managed, and tracked it down to sb->size being set to 0.
> 

The 'Used Dev Size' is the amount of each device that is used in the array.
For RAID0 (and linear), there is no such number.  The devices can be of
different sizes and in each case "all" of the available space is used.
So in this case '0' means 'all'.  I should probably just remove the number
as it doesn't mean anything.

This has nothing to do with the bitmap.  Space reserved for the bitmap is
out side of the 'Avail Dev Size'.

NeilBrown

  reply	other threads:[~2010-07-22  5:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 16:16 Why is sb->size set to 0 with raid0? Mario 'BitKoenig' Holbe
2010-07-22  5:34 ` Neil Brown [this message]
2010-07-22 11:36   ` Mario 'BitKoenig' Holbe
2010-07-22 12:50   ` Roman Mamedov
2010-07-22 13:02     ` Neil Brown
2010-07-22 13:04     ` Mario 'BitKoenig' Holbe

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=20100722153456.04f751e7@notabene \
    --to=neilb@suse.de \
    --cc=Mario.Holbe@TU-Ilmenau.DE \
    --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).