diff options
| author | Heinz Mauelshagen <[email protected]> | 2025-06-16 14:50:05 +0000 |
|---|---|---|
| committer | Mikulas Patocka <[email protected]> | 2025-06-23 10:35:37 +0000 |
| commit | 9de4a3967caf1865a95aebdd63fccf213d174ede (patch) | |
| tree | e413b9ad7a7ab3ab7bb5ff0ac73ca478c94fa306 /drivers/md/dm-raid.c | |
| parent | dm-flakey: Fix corrupt_bio_byte setup checks (diff) | |
| download | kernel-9de4a3967caf1865a95aebdd63fccf213d174ede.tar.gz kernel-9de4a3967caf1865a95aebdd63fccf213d174ede.zip | |
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 <[email protected]>
Signed-off-by: Mikulas Patocka <[email protected]>
Diffstat (limited to 'drivers/md/dm-raid.c')
| -rw-r--r-- | drivers/md/dm-raid.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index d296770478b2..c4fa8e0e76d2 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -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)) |
