mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
c95f17ea64
Commit b248ba0a396d7fc9a459eea02cfdc70b33ce3441 attempted to prevent mirror devices which had a failed device in their mirrored log from being usable/readable by LVM. This was to protect against circular dependancies where one LVM command could be blocked trying to read one of these affected mirrors while the LVM command to fix/unblock that mirror was stuck behind the currently running command. The above commit went wrong when it used 'device_is_usable()' to recurse on the mirrored log device to check if it was suspended or blocked. The 'device_is_usable' function also contains a check for reserved names - like *_mlog, etc. This last check always triggered when checking a mirror's log simply because of the name, not because it was suspended or blocked - a false positive. The solution is to create a new function like 'device_is_usable', but without the check for reserved names. Using this new function (device_is_suspended_or_blocked), we can check the status of a mirror's log device properly.