]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: stop keeping raid set frozen altogether
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 13 Dec 2017 16:13:18 +0000 (17:13 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 13 Dec 2017 16:52:02 +0000 (11:52 -0500)
commit1189d68f91da2c259b92df76cdca231eceb5e529
tree0ef98a68bb0a8722a4765eac7be2fb3204fa8c92
parentb69b26059c7b1270ee0bd45dc95fb63e43aad051
dm raid: stop keeping raid set frozen altogether

In order to avoid redoing synchronization/recovery/reshape partially,
the raid set got frozen until after all passed in table line flags had
been cleared.  The related table reload sequence had to be precisely
followed, or reshaping may lead to data corruption caused by the active
mapping carrying on with a reshape when the inactive mapping already
had retrieved a stale reshape position.

Harden by retrieving the actual resync/recovery/reshape position
during resume whilst the active table is suspended thus avoiding
to keep the raid set frozen altogether.  This prevents superfluous
redoing of an already resynchronized or recovered segment and,
most importantly, potential for redoing of an already reshaped
segment causing data corruption.

Fixes: 3b939afb5 ("dm raid: fix raid_resume() to keep raid set frozen as needed")
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Documentation/device-mapper/dm-raid.txt
drivers/md/dm-raid.c