Package: evms
Version: 2.5.5-20
Severity: normal
Tags: patch,upstream

Hi there,

starting somewhere between 2.6.18 and 2.6.19 making snapshots stopped
working.

The device mapper complains like this:

device-mapper: table: 254:52: snapshot: requires exactly 4 arguments

EVMS passes one argument more than expected.  Apparently the evms patch
that actually supported the argument never made it into device mapper.

Before 2.6.19 it was ignored, so I assume it's save to just drop it.
Attached a patch does that.

Juergen


PS: also posted upstream ([EMAIL PROTECTED], but awaiting
    moderator approval).


-- Package-specific info:

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20.5
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages evms depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libevms-2.5                 2.5.5-13     Enterprise Volume Management Syste
ii  lsb-base                    3.1-23.1     Linux Standard Base 3.1 init scrip

Versions of packages evms recommends:
ii  evms-cli                      2.5.5-20   Enterprise Volume Management Syste
ii  evms-ncurses                  2.5.5-20   Enterprise Volume Management Syste

-- no debconf information

--- engine/dm-targets.c.orig	2007-04-10 21:35:29.651723176 +0200
+++ engine/dm-targets.c	2007-04-10 21:35:59.293412360 +0200
@@ -921,14 +921,14 @@
  *
  * Generate an ASCII constructor string for a snapshot target.
  * A snapshot string has the form:
- *   <org_major>:<org_minor> <snap_major>:<snap_minor> <p|n> <chunk_size> <org_parent_major>:<org_parent_minor>
+ *   <org_major>:<org_minor> <snap_major>:<snap_minor> <p|n> <chunk_size>
  **/
 static int snapshot_build_params(dm_target_t *target)
 {
 	dm_target_snapshot_t *snapshot = target->data.snapshot;
 	char *format = (dm_get_version() == 3) ?
-			"%x:%x %x:%x %c %u %x:%x" :
-			"%u:%u %u:%u %c %u %u:%u";
+			"%x:%x %x:%x %c %u" :
+			"%u:%u %u:%u %c %u";
 	int rc = ENOMEM;
 
 	LOG_PROC_ENTRY();
@@ -938,9 +938,7 @@
 		snprintf(target->params, 50, format,
 			 snapshot->origin.major, snapshot->origin.minor,
 			 snapshot->snapshot.major, snapshot->snapshot.minor,
-			 (snapshot->persistent) ? 'p' : 'n', snapshot->chunk_size,
-			 snapshot->origin_parent.major,
-			 snapshot->origin_parent.minor);
+			 (snapshot->persistent) ? 'p' : 'n', snapshot->chunk_size);
 		rc = 0;
 	}
 

Reply via email to