mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[PATCH] md: new sysfs interface for setting bits in the write-intent-bitmap
Add a new sysfs interface that allows the bitmap of an array to be dirtied. The interface is write-only, and is used as follows: echo "1000" > /sys/block/md2/md/bitmap (dirty the bit for chunk 1000 [offset 0] in the in-memory and on-disk bitmaps of array md2) echo "1000-2000" > /sys/block/md1/md/bitmap (dirty the bits for chunks 1000-2000 in md1's bitmap) This is useful, for example, in cluster environments where you may need to combine two disjoint bitmaps into one (following a server failure, after a secondary server has taken over the array). By combining the bitmaps on the two servers, a full resync can be avoided (This was discussed on the list back on March 18, 2005, "[PATCH 1/2] md bitmap bug fixes" thread). Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
76186dd8b7
commit
9b1d1dac18
4 changed files with 56 additions and 0 deletions
|
|
@ -410,6 +410,15 @@ also have
|
|||
than sectors, this my be larger than the number of actual errors
|
||||
by a factor of the number of sectors in a page.
|
||||
|
||||
bitmap_set_bits
|
||||
If the array has a write-intent bitmap, then writing to this
|
||||
attribute can set bits in the bitmap, indicating that a resync
|
||||
would need to check the corresponding blocks. Either individual
|
||||
numbers or start-end pairs can be written. Multiple numbers
|
||||
can be separated by a space.
|
||||
Note that the numbers are 'bit' numbers, not 'block' numbers.
|
||||
They should be scaled by the bitmap_chunksize.
|
||||
|
||||
Each active md device may also have attributes specific to the
|
||||
personality module that manages it.
|
||||
These are specific to the implementation of the module and could
|
||||
|
|
|
|||
Loading…
Reference in a new issue