From c62f9f0b2fd4f288349a535e9a99a1e5b883ebbf Mon Sep 17 00:00:00 2001 From: Jonathan Earl Brassow Date: Fri, 20 Apr 2012 14:17:44 +0000 Subject: [PATCH] Unlike 'mirror' segtype, 'raid1' should perform flush on suspend. The 'mirror' segtype and 'raid1' segtype both set the 'MIRRORED' flag. However, due to differences in the way these device-mapper targets behave 'mirror' must be suspended with the 'noflush' option and 'raid1' does not have to be. This patch ensures that when the 'MIRRORED' flag is checked to see if 'noflush' is needed that it does not also set it for 'raid1' by mistake. --- WHATS_NEW | 1 + lib/activate/dev_manager.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 04650f997..487786b52 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.96 - ================================ + Unlike 'mirror' segtype, 'raid1' should perform flush on suspend. Add udev info and context to lvmdump. Fix RAID device replacement code so that it works under snapshot. Fix inability to split RAID1 image while specifying a particular PV. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 607b4dbd7..84a5e57cf 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -2178,7 +2178,8 @@ static int _tree_action(struct dev_manager *dm, struct logical_volume *lv, break; case SUSPEND: dm_tree_skip_lockfs(root); - if (!dm->flush_required && (lv->status & MIRRORED) && !(lv->status & PVMOVE)) + if (!dm->flush_required && !seg_is_raid(first_seg(lv)) && + (lv->status & MIRRORED) && !(lv->status & PVMOVE)) dm_tree_use_no_flush_suspend(root); /* Fall through */ case SUSPEND_WITH_LOCKFS: