]> sourceware.org Git - lvm2.git/commit
mirror: fix flushing for mirror target
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 5 Apr 2016 19:34:42 +0000 (21:34 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 6 Apr 2016 09:31:02 +0000 (11:31 +0200)
commitd4c03cf7b21279ad28b8b9944d0281a55692efcc
tree0b9f274eee136a4f00752b76c2986e78d1b6ffc4
parent76fc41fb9d06519d7410f0054c279ea3a8dccc37
mirror: fix flushing for mirror target

Fix regression caused by commit ba41ee1dc94264f7ac8e61f8b1d56b10225b0d2f.
The idea was to use no_flush for changed device only for thin volumes
and thin pools but also to merge this with change made in commit
844b00958492224c448b30f89ae5532bb6591fd2.

However the resulting condition has caused misbehavior for the mirror
suspend - as that has been before the ONLY allowed target type
that could have been suspended with noflush.

Result was badly working repair for --type mirror that has been
passing 'flush' to the repaired mirror target whenever preload
wrongly set flush_required.

The origin code has required the flush_required to be set whenever
deivce size is changed.

Now it first detects if device size got smaller
'dm_tree_node_size_changed(root) < 0' - this requires flush.
Otherwise it checks device is not thin volume nor thin pool and its
size has changed (got bigger) and requires flush.

This mean upsize of thin-pool or thin volume will not require flush.
lib/activate/dev_manager.c
This page took 0.047397 seconds and 5 git commands to generate.