]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/bitmap: allow a bitmap with no backing storage.
authorNeilBrown <neilb@suse.de>
Tue, 24 Apr 2012 00:57:53 +0000 (10:57 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 24 Apr 2012 00:57:53 +0000 (10:57 +1000)
commit0aa192f7c6b7388fa659ea30933d59bc74ba3fb8
treeca5c90da2887f2129885d9fcb76c4a5ae6a5885a
parentdfb8d5d76f9debf0e92b84a8e1cd6b3a5d785ad0
md/bitmap: allow a bitmap with no backing storage.

An md bitmap comprises two parts
 - internal counting of active writes per 'chunk'.
 - external storage of whether there are any active writes on
   each chunk

The second requires the first, but the first doesn't require the
second.

Not having backing storage means that the bitmap cannot expedite
resync after a crash, but it still allows us to expedite the recovery
of a recently-removed device.

So: allow a bitmap to exist even if there is no backing device.
In that case we default to 128M chunks.

A particular value of this is that we can remove and re-add a bitmap
(possibly of a different granularity) on a degraded array, and not
lose the information needed to fast-recover the missing device.

We don't actually activate these bitmaps yet - that will come
in a later patch.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/bitmap.c
drivers/md/md.c