LVM2 ./WHATS_NEW lib/config/defaults.h tools/l ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-11-27 14:35:39
Modified files:
. : WHATS_NEW lib/config : defaults.h tools : lvconvert.c lvcreate.c
Log message:
Do not allow creating mirrors of more than 8 images.
This is kernel limitation in all kernel versions, so better detect this early.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1334&r2=1.1335
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/defaults.h.diff?cvsroot=lvm2&r1=1.53&r2=1.54
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.97&r2=1.98
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.210&r2=1.211
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.57 - ==================================== + Do not allow creating mirrors of more than 8 images. Use locking_type 3 (compiled in cluster locking) in lvmconf. Remove duplicate dm_list macros and functions. Log failure type and recognise type 'F' (flush) in dmeventd mirror plugin.
lib/config/defaults.h +1 -0
@@ -47,6 +47,7 @@#define DEFAULT_MIRRORLOG "disk"#define DEFAULT_MIRROR_LOG_FAULT_POLICY "allocate"#define DEFAULT_MIRROR_DEV_FAULT_POLICY "remove" +#define DEFAULT_MIRROR_MAX_IMAGES 8/* limited by kernel DM_KCOPYD_MAX_REGIONS */ #define DEFAULT_DMEVENTD_MIRROR_LIB "libdevmapper-event-lvm2mirror.so"#define DEFAULT_DMEVENTD_MONITOR 1
tools/lvconvert.c +6 -0
@@ -571,6 +571,12 @@else lp->mirrors +=1 ; +if (lp->mirrors >DEFAULT_MIRROR_MAX_IMAGES ) { +log_error ("Only up to %d images in mirror supported currently." , +DEFAULT_MIRROR_MAX_IMAGES ); +return 0 ; + } +if (repair) { cmd->handles_missing_pvs =1 ; cmd->partial_activation =1 ;
tools/lvcreate.c +6 -0
@@ -500,6 +500,12 @@return 0 ; } +if (lp->mirrors >DEFAULT_MIRROR_MAX_IMAGES ) { +log_error ("Only up to %d images in mirror supported currently." , +DEFAULT_MIRROR_MAX_IMAGES ); +return 0 ; + } +/* * Read ahead. */