Thread (6 messages) 6 messages, 3 authors, 2010-07-22

Re: Why is sb->size set to 0 with raid0?

From: Neil Brown <hidden>
Date: 2010-07-22 05:34:56

On Wed, 21 Jul 2010 18:16:46 +0200
Mario 'BitKoenig' Holbe [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help