mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
dm raid: add support for resync w/o metadata devices
Target does not honour the "sync" argument when activated w/o metadata devices, e.g. with table line: "0 $(blockdev --getsz $data1) raid raid1 2 0 sync 2 - $data1 - $data2". Fix this to support temporary, transient raid devices useful for data duplication. Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
parent
75227ed681
commit
9de4a3967c
|
|
@ -2532,6 +2532,10 @@ static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs)
|
|||
struct md_rdev *rdev, *freshest;
|
||||
struct mddev *mddev = &rs->md;
|
||||
|
||||
/* Respect resynchronization requested with "sync" argument. */
|
||||
if (test_bit(__CTR_FLAG_SYNC, &rs->ctr_flags))
|
||||
set_bit(MD_ARRAY_FIRST_USE, &mddev->flags);
|
||||
|
||||
freshest = NULL;
|
||||
rdev_for_each(rdev, mddev) {
|
||||
if (test_bit(Journal, &rdev->flags))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user