Re: Why is sb->size set to 0 with raid0?
From: Mario 'BitKoenig' Holbe <hidden>
Date: 2010-07-22 11:36:07
Neil Brown [off-list ref] wrote:
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.
Hmm, RAID0 has a chunk size - but I guess this is what you meant with the quotes around "all" :)
This has nothing to do with the bitmap. Space reserved for the bitmap is out side of the 'Avail Dev Size'.
Sure, it has: having a zero 'Used Dev Size' (i.e. sb->size = 0) results
in not reserving space for a bitmap - at least for v1 superblocks:
array_size = __le64_to_cpu(sb->size);
/* work out how much space we left for a bitmap */
bm_space = choose_bm_space(array_size);
... which I like in case of RAID0 (as I said), but of which I don't know
if you do like it as well ;) - for example, because it also prevents a
bitmap when the RAID0 is later converted to RAID5.
regards
Mario
--
Jene, die grundlegende Freiheit aufgeben wuerden, um eine geringe
voruebergehende Sicherheit zu erwerben, verdienen weder Freiheit noch
Sicherheit.
-- Benjamin Franklin (1706-1790)