]> git.ipfire.org Git - thirdparty/mdadm.git/commit - restripe.c
raid6check: various cleanup/fixes
authorNeilBrown <neilb@suse.de>
Mon, 20 Jul 2015 04:11:33 +0000 (14:11 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 20 Jul 2015 04:11:33 +0000 (14:11 +1000)
commit50786d4731bd1768f02348435c6f654f566c581b
tree0366cde6cbec69a4e0d83be2f27ec6fa38e23cc5
parent29a312f2f39afeb9e01a27e77655dda8de4cd7e3
raid6check: various cleanup/fixes

- document meaning of various arrays. In particular:
   stripes[]
   blocks[]
   blocks_page[]
   block_index_for_slot[]

  It needs to be clear if these are indexed by raid_disk
  number or syndrome number.

- changed meaning of block_index_for_slot[].  It didn't seem
  to be used consistently.  It also made use of the block numbers
  in array data ordering, which is not directly relevant for syndrome
  calculations.

- reduced number of args to autorepair and manual_repair
  There don't need both stripes[] and blocks[].  And they don't need
  diskP or diskQ.
  blocks[-1] is the P chunk, blocks[-2] is the Q chunk.
  block_index_for_slot[] can be used to find the target device for
  a particular syndrome block.

- remove stripe locking from within manual_repair, and instead
  use the global stripe locking used for check and autorepair.

- this necessitated changes to raid6_datap_recov and raid5_2data_reov
  so the P and Q blocks could be before or after the data blocks.

Signed-off-by: NeilBrown <neilb@suse.de>
raid6check.c
restripe.c