1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-24 06:04:19 +03:00

mirror table generating code: Properly handle 'block_on_errors' and 'cluster' features

The device-mapper mirror CTR table has been changing over time.  This has
now been corrected to handle the old and new methods for invoking the
'block_on_errors' and 'cluster' features.  (The code that does this was
accidentally committed in the previous check-in.  This check-in finishes
the job.)
This commit is contained in:
Jonathan Earl Brassow 2009-08-13 19:36:04 +00:00
parent f0153d801e
commit 01b09aab43
2 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.37 -
=================================
Fix mirror table CTR code to handle 'block_on_error' and 'cluster' features
Version 1.02.36 - 6th August 2009
=================================

View File

@ -362,14 +362,22 @@ static int _mirrored_target_present(struct cmd_context *cmd,
_mirrored_present = target_present(cmd, "mirror", 1);
/*
* block_on_error available with mirror target >= 1.1 and <= 1.11
* block_on_error available as "block_on_error" log
* argument with mirror target >= 1.1 and <= 1.11
* or with 1.0 in RHEL4U3 driver >= 4.5
*
* block_on_error available as "handle_errors" mirror
* argument with mirror target >= 1.12.
*
* libdm-deptree.c is smart enough to handle the differences
* between block_on_error and handle_errors for all
* mirror target versions >= 1.1
*/
/* FIXME Move this into libdevmapper */
if (target_version("mirror", &maj, &min, &patchlevel) &&
maj == 1 &&
((min >= 1 && min <= 11) ||
((min >= 1) ||
(min == 0 && driver_version(vsn, sizeof(vsn)) &&
sscanf(vsn, "%u.%u.%u", &maj2, &min2, &patchlevel2) == 3 &&
maj2 == 4 && min2 == 5 && patchlevel2 == 0))) /* RHEL4U3 */