Hello community, here is the log from the commit of package lvm2 for openSUSE:Factory checked in at 2014-11-11 10:00:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lvm2 (Old) and /work/SRC/openSUSE:Factory/.lvm2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lvm2" Changes: -------- --- /work/SRC/openSUSE:Factory/lvm2/lvm2.changes 2014-09-06 12:18:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.lvm2.new/lvm2.changes 2014-11-11 10:16:04.000000000 +0100 @@ -1,0 +2,84 @@ +Mon Nov 10 09:01:35 UTC 2014 - dims...@opensuse.org + +- Require device-mapper by device-mapper-devel: otherwise, the .so + symlinks might happen to point to no target. + +------------------------------------------------------------------- +Tue Oct 28 07:18:36 UTC 2014 - lw...@suse.com + +- Delete BuildRequire for device-mapper-devel for all symbols needed + is created in ./include/.symlinks file. +- Add link /usr/sbin/lvm file to avoid others using /usr/sbin/lvm + +------------------------------------------------------------------- +Fri Sep 26 07:09:27 UTC 2014 - lw...@suse.com + +- recover no_buildroot_shared.diff, this may cause gcc error + +------------------------------------------------------------------- +Wed Sep 24 08:24:13 UTC 2014 - lw...@suse.com + +- All patches eliminated since update to 2.02.111 + - Eliminated 25 patches in lvm2 package: + no_buildroot_shared.diff: don't know why necessary change this + pipe_buff-definition.diff: don't know why necessary + handle_extended_devt.diff: not need(bnc#525060 not reproduce even without this patch) + support-drbd-filter.diff: source to patch not found + lvm-path.patch: not needed, upstream fixed hardcode + suppress_locking_failer_message.patch: no doc as to why suppress warning + add_scm_support.patch: definition device_info_t _device_info is no longer exist + upstream patches(18): + man_page_sectors.diff + make_raid1_default.diff + remove-fedora-systemd.patch + 0001-lvmetad-Init-lazily-to-avoid-socket-access-on-config.patch + do_not_read_from_mirrors_have_failed_devices.diff + avoid_reading_failed_dev_in_mirrored_log.diff + mirrored_log_fixed_when_double_fault_occurs.diff + device_is_usable_mem_leak.diff + clmvd-fix-decriptor-leak-on-restart.patch + clvmd-Fix-node-up-down-handing-in-corosync-module.patch + clvmd-Avoid-a-3-way-deadlock-in-dead-client-cleanup.patch + 0001-clvmd-avoid-logging-in-signal-handler.patch + 0001-RAID-Make-RAID-4-5-6-display-sync-status-under-headi.patch + clvmd-fix-debugging-level-set-in-clvmd_set_debug-function.patch + 0001-toolcontext-Only-reopen-stdin-if-readable.patch + systemd-lvm2-activation-generator-report-only-error.patch + systemd-use-umask-022-for-generated-systemd-units-by.patch + remove-quote-in-lvm2-monitor.patch + + - Eliminated 6 patches in device-mapper package: + bug-479104_device-mapper-dmsetup-deps-export.patch:merged with device-mapper-dmsetup-export.patch + udev_sync-cookie_set-1-on-each-dm_task_set_cookie-ca.patch: already included in upstream + increase-minor-version.diff: not needed + segault_for_truncated_string_token.patch: upstream + s390-sectorsize4096.patch: upstream + add_integrate_flush_flag.patch: included in cmirrord_improvment_performance.patch + + - Moved device-mapper patches to lvm2: + device-mapper-dmsetup-export.patch(bnc#707253) + device-mapper-gcc-warnings.patch + device-mapper-static.patch + device-mapper-link + udev_rules-update.diff(bnc#78902,bnc#789019,bnc#789020) + +------------------------------------------------------------------- +Wed Sep 24 02:34:46 UTC 2014 - lw...@suse.com + +- cmirrord has endian issue which cause cmirrord start fail on s390 + patch: cmirrord-fix-s390-endian-issue.patch(bnc#890452,bnc#893684) + +------------------------------------------------------------------- +Thu Sep 11 15:55:50 UTC 2014 - je...@suse.com + +- Integrated device-mapper and thin-provisioning packages into + lvm2 package. device-mapper and lvm2 have been included in + the same source repository for some time. + +------------------------------------------------------------------- +Thu Sep 11 05:17:27 UTC 2014 - je...@suse.com + +- Update to 2.02.111 + - Eliminated 21 patches. + +------------------------------------------------------------------- Old: ---- 0001-RAID-Make-RAID-4-5-6-display-sync-status-under-headi.patch 0001-clvmd-avoid-logging-in-signal-handler.patch 0001-lvmetad-Init-lazily-to-avoid-socket-access-on-config.patch 0001-toolcontext-Only-reopen-stdin-if-readable.patch LVM2.2.02.98.tgz LVM2.2.02.98.tgz.asc add_scm_support.patch avoid_reading_failed_dev_in_mirrored_log.diff clmvd-fix-decriptor-leak-on-restart.patch clvmd-Avoid-a-3-way-deadlock-in-dead-client-cleanup.patch clvmd-Fix-node-up-down-handing-in-corosync-module.patch clvmd-fix-debugging-level-set-in-clvmd_set_debug-function.patch device_is_usable_mem_leak.diff do_not_read_from_mirrors_have_failed_devices.diff handle_extended_devt.diff lvm-path.patch make_raid1_default.diff man_page_sectors.diff mirrored_log_fixed_when_double_fault_occurs.diff pipe_buff-definition.diff remove-fedora-systemd.patch remove-quote-in-lvm2-monitor.patch support-drbd-filter.diff suppress_locking_failer_message.patch systemd-lvm2-activation-generator-report-only-error.patch systemd-use-umask-022-for-generated-systemd-units-by.patch New: ---- LVM2.2.02.111.tgz LVM2.2.02.111.tgz.asc cmirrord-fix-s390-endian-issue.patch device-mapper-dmsetup-export.patch device-mapper-gcc-warnings.patch device-mapper-link device-mapper-static.patch thin-provisioning-tools-v0.4.1.tar.gz udev_rules-update.diff version-plugins-in-libdir ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lvm2.spec ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:05.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:05.000000000 +0100 @@ -16,10 +16,16 @@ # +%define lvm2_version 2.02.111 +%define device_mapper_version 1.02.90 +%define thin_provisioning_version 0.4.1 + Url: http://www.sourceware.org/lvm2/ Name: lvm2 -BuildRequires: device-mapper-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libaio-devel BuildRequires: libcorosync-devel BuildRequires: libdlm-devel BuildRequires: libselinux-devel @@ -28,9 +34,9 @@ BuildRequires: suse-module-tools BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(udev) -Requires: device-mapper >= 1.02.25 +Requires: device-mapper >= 1.02.90 Provides: lvm -Version: 2.02.98 +Version: %{lvm2_version} Release: 0 Summary: Logical Volume Manager Tools License: GPL-2.0 and LGPL-2.1 @@ -42,83 +48,55 @@ Source10: cmirrord.ocf Source14: baselibs.conf Source16: csm-converter.tar.gz +Source50: thin-provisioning-tools-v%{thin_provisioning_version}.tar.gz -Patch: improve_probing.diff +Patch1: improve_probing.diff Patch2: no-inc-audit.diff Patch3: no_buildroot_shared.diff Patch4: sys_mount_instead_linux_fs.diff -Patch6: man_page_sectors.diff - -Patch13: pipe_buff-definition.diff -Patch20: support-drbd-filter.diff -Patch22: handle_extended_devt.diff #suse -Patch23: display-dm-name-for-lv-name.diff +Patch5: display-dm-name-for-lv-name.diff +Patch6: device-mapper-type_punning.diff -Patch66: device-mapper-type_punning.diff -Patch67: lvm-path.patch - -#fate312248,patch68,69 -Patch68: make-mirror-legs-on-different-tag-pvs.patch -Patch69: improve-mirror-legs-on-different-tag-pvs.patch - -#upstream -Patch71: make_raid1_default.diff -#suppress warning -Patch72: suppress_locking_failer_message.patch -#upstream -Patch73: remove-fedora-systemd.patch +#fate312248, patch6,7 +Patch7: make-mirror-legs-on-different-tag-pvs.patch +Patch8: improve-mirror-legs-on-different-tag-pvs.patch #fate#315092 -Patch75: cmirrord_improvment_performance.patch - -#bnc#862076 -Patch76: 0001-lvmetad-Init-lazily-to-avoid-socket-access-on-config.patch +Patch9: cmirrord_improvment_performance.patch -#fate#314367 -Patch77: cluster_support_mirrord_log.diff -Patch78: lvconvert-cluster-mirrored-disk-failed.patch - -Patch79: add_scm_support.patch - -#upstream backport -Patch80: do_not_read_from_mirrors_have_failed_devices.diff -Patch81: avoid_reading_failed_dev_in_mirrored_log.diff -Patch82: mirrored_log_fixed_when_double_fault_occurs.diff -Patch83: device_is_usable_mem_leak.diff +#fate#314367, patch10,11 +Patch10: cluster_support_mirrord_log.diff +Patch11: lvconvert-cluster-mirrored-disk-failed.patch #forward-port from sle11 -Patch84: suppress_format1_size_warning.diff -Patch85: pvmove_support_clustered_vg.diff - -#upstream -Patch86: clmvd-fix-decriptor-leak-on-restart.patch -Patch87: clvmd-Fix-node-up-down-handing-in-corosync-module.patch -Patch88: clvmd-Avoid-a-3-way-deadlock-in-dead-client-cleanup.patch -Patch89: 0001-clvmd-avoid-logging-in-signal-handler.patch +Patch12: suppress_format1_size_warning.diff +Patch13: pvmove_support_clustered_vg.diff # Never upstream -Patch90: cmirrord_remove_date_time_from_compilation.patch +Patch14: cmirrord_remove_date_time_from_compilation.patch -#upstream, bnc#871176 -Patch91: 0001-RAID-Make-RAID-4-5-6-display-sync-status-under-headi.patch -#fixed in upstream,bnc#785467 -Patch92: clvmd-fix-debugging-level-set-in-clvmd_set_debug-function.patch -#upstream -Patch93: 0001-toolcontext-Only-reopen-stdin-if-readable.patch #suse, bnc873538 -Patch94: fix-closedown-before-thread-finish.patch -#upstream -Patch95: systemd-lvm2-activation-generator-report-only-error.patch +Patch15: fix-closedown-before-thread-finish.patch #suse, bnc#870824 -Patch96: use-mirrortype-asdefault-whenclvmdrunning.patch -# bnc#878481 -Patch97: systemd-use-umask-022-for-generated-systemd-units-by.patch -# bnc#878930 -Patch98: remove-quote-in-lvm2-monitor.patch -# bnc#875233 -Patch99: udev-Check-for-DM_NR_VALID_PATHS.patch +Patch16: use-mirrortype-asdefault-whenclvmdrunning.patch + +Patch17: version-plugins-in-libdir + +#suse, bnc#890452,bnc#893684 +Patch18: cmirrord-fix-s390-endian-issue.patch + +# device-mapper patches +#suse, bnc#707253(also merged patch for bnc#479104) +Patch200: device-mapper-dmsetup-export.patch +Patch201: device-mapper-gcc-warnings.patch +Patch202: device-mapper-static.patch +Patch203: device-mapper-link +#suse, bnc#78902,bnc#789019,bnc#789020 +Patch204: udev_rules-update.diff +#suse, bnc#875233 +Patch205: udev-Check-for-DM_NR_VALID_PATHS.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # Not a real replacement but we drop evms @@ -132,57 +110,42 @@ Obsoletes: evms-ha <= 2.5.5 %define _udevdir %(pkg-config --variable=udevdir udev) +%if %{defined systemd_requires} %{systemd_requires} +%endif %description Programs and man pages for configuring and using the LVM2 Logical Volume Manager. - %prep -%setup -q -n LVM2.%{version} -%patch -p1 -%patch2 -%patch3 -%patch4 +%setup -q -n LVM2.%{version} -a 50 -a 16 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 %patch13 -p1 -%patch20 -p1 -%patch22 -p1 -%patch23 -p1 -%patch66 -p1 -%patch67 -p1 -%patch68 -p1 -%patch69 -p1 -%patch71 -p1 -%patch72 -p1 -%patch73 -p1 -%patch75 -p1 -%patch76 -p1 -%patch77 -p1 -%patch78 -p1 -%patch79 -p1 -%patch80 -p1 -%patch81 -p1 -%patch82 -p1 -%patch83 -p1 -%patch84 -p1 -%patch85 -p1 -%patch86 -p1 -%patch87 -p1 -%patch88 -p1 -%patch89 -p1 -%patch90 -p1 -%patch91 -p1 -%patch92 -p1 -%patch93 -p1 -%patch94 -p1 -%patch95 -p1 -%patch96 -p1 -%patch97 -p1 -%patch98 -p1 -%patch99 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 + +%patch200 -p1 +%patch201 -p1 +%patch202 -p1 +%patch203 -p1 +%patch204 -p1 +%patch205 -p1 %build #set path so that thin_check can be found @@ -190,76 +153,89 @@ export MODPROBE_CMD=/sbin/modprobe export CFLAGS="$RPM_OPT_FLAGS" export PATH=$PATH:/sbin:/usr/sbin -%configure --prefix=/ \ - --bindir=/bin --libdir=/%_lib --with-usrlibdir=%_libdir \ - --sbindir=/sbin --enable-dmeventd \ - --enable-udev_sync --enable-udev_rules \ - --enable-cmdlib --enable-applib --enable-dmeventd \ - --enable-realtime --enable-pkgconfig \ +sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM +autoreconf -fvi +%configure \ + --prefix=/ \ + --bindir=/bin \ + --libdir=/%_lib \ + --with-usrlibdir=%_libdir \ + --with-usrsbindir=%_sbindir \ + --sbindir=/sbin \ + --enable-dmeventd \ + --enable-udev_sync \ + --enable-udev_rules \ + --enable-cmdlib \ + --enable-applib \ + --enable-dmeventd \ + --enable-realtime \ + --enable-pkgconfig \ --enable-selinux \ - --with-clvmd=corosync --with-cluster=internal --with-cluster=internal \ - --datarootdir=/usr/share --with-default-locking-dir=/run/lock/lvm \ - --enable-cmirrord --with-thin=internal --enable-lvmetad --with-default-pid-dir=/run \ - --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm --with-tmpfilesdir=%{_tmpfilesdir} + --with-clvmd=corosync \ + --with-cluster=internal \ + --datarootdir=/usr/share \ + --with-default-locking-dir=/run/lock/lvm \ + --enable-cmirrord \ + --enable-lvmetad \ + --with-default-pid-dir=/run \ + --with-default-dm-run-dir=/run \ + --with-default-run-dir=/run/lvm \ + --with-tmpfilesdir=%{_tmpfilesdir} \ + --with-thin=internal \ + --with-device-gid=6 \ + --with-device-mode=0640 \ + --with-device-uid=0 \ + --with-dmeventd-path=/sbin/dmeventd \ + --with-thin-check=/sbin/thin_check \ + --with-thin-dump=%{_sbindir}/thin_dump \ + --with-thin-repair=%{_sbindir}/thin_repair \ + --with-udev-prefix=/usr/ + export SUSE_ASNEEDED=0 -make -j1 # symlinks are generated in parallel! %{?_smp_mflags} + +make %{?_smp_mflags} #csm convert -tar zxvf %{S:16} pushd bnz -make +make %{?_smp_mflags} +popd + +pushd thin-provisioning-tools-%{thin_provisioning_version} +autoreconf -fiv +%configure --sbindir=/sbin --prefix=/usr +make %{?_smp_mflags} popd %install -make install_lvm2 DESTDIR=$RPM_BUILD_ROOT +%makeinstall make install_system_dirs DESTDIR=$RPM_BUILD_ROOT make install_systemd_units DESTDIR=$RPM_BUILD_ROOT make install_systemd_generators DESTDIR=$RPM_BUILD_ROOT make install_tmpfiles_configuration DESTDIR=$RPM_BUILD_ROOT -make -C liblvm install DESTDIR=$RPM_BUILD_ROOT -install -d -m 755 $RPM_BUILD_ROOT/etc/lvm -install -d -m 755 $RPM_BUILD_ROOT/etc/lvm/backup -install -d -m 755 $RPM_BUILD_ROOT/etc/lvm/archive +# Is this directory used anymore? install -d -m 755 $RPM_BUILD_ROOT/etc/lvm/metadata install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/lvm mkdir -p $RPM_BUILD_ROOT/etc/init.d +mkdir -p $RPM_BUILD_ROOT/usr/sbin install -m755 -D %{S:8} $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/lvm2/clvmd install -m755 -D %{S:10} $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/lvm2/cmirrord -rm -f $RPM_BUILD_ROOT/%_libdir/libdevmapper-event-lvm2.so -ln -sf libdevmapper-event-lvm2.so.2.02 $RPM_BUILD_ROOT/%_lib/libdevmapper-event-lvm2.so pushd $RPM_BUILD_ROOT/%_lib -rm -f $RPM_BUILD_ROOT/%_libdir/liblvm2app.so -rm -f $RPM_BUILD_ROOT/%_libdir/liblvm2cmd.so ln -sf liblvm2cmd.so.2.02 liblvm2cmd.so ln -sf liblvm2app.so.2.2 liblvm2app.so ln -sf device-mapper/libdevmapper-event-lvm2mirror.so libdevmapper-event-lvm2mirror.so.2.02 ln -sf device-mapper/libdevmapper-event-lvm2snapshot.so libdevmapper-event-lvm2snapshot.so.2.02 ln -sf device-mapper/libdevmapper-event-lvm2raid.so libdevmapper-event-lvm2raid.so.2.02 ln -sf device-mapper/libdevmapper-event-lvm2thin.so libdevmapper-event-lvm2thin.so.2.02 +ln -sf device-mapper/libdevmapper-event-lvm2mirror.so libdevmapper-event-lvm2mirror.so +ln -sf device-mapper/libdevmapper-event-lvm2snapshot.so libdevmapper-event-lvm2snapshot.so +ln -sf device-mapper/libdevmapper-event-lvm2raid.so libdevmapper-event-lvm2raid.so +ln -sf device-mapper/libdevmapper-event-lvm2thin.so libdevmapper-event-lvm2thin.so popd -install -d $RPM_BUILD_ROOT/usr/sbin -pushd daemons/clvmd -make install DESTDIR=$RPM_BUILD_ROOT -popd -pushd daemons/cmirrord -make install DESTDIR=$RPM_BUILD_ROOT -popd -pushd man -make install DESTDIR=$RPM_BUILD_ROOT + +pushd $RPM_BUILD_ROOT/usr/sbin +ln -sf ../../sbin/lvm lvm popd -mv $RPM_BUILD_ROOT/sbin/clvmd $RPM_BUILD_ROOT/usr/sbin/clvmd -mv $RPM_BUILD_ROOT/sbin/cmirrord $RPM_BUILD_ROOT/usr/sbin/cmirrord -mkdir -p $RPM_BUILD_ROOT/usr/share -rm $RPM_BUILD_ROOT/etc/lvm/cache/.cache - -#remove device-mapper man page -rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/dm* -#remove device-mapper systemd events -rm -f $RPM_BUILD_ROOT/%{_unitdir}/dm-event.socket -rm -f $RPM_BUILD_ROOT/%{_unitdir}/dm-event.service -# install and collect_lvm -#install -m755 -D %{S:7} $RPM_BUILD_ROOT%{_udevdir}/collect_lvm #csm-convert pushd bnz @@ -268,6 +244,10 @@ mv README.csm-converter .. popd +pushd thin-provisioning-tools-%{thin_provisioning_version} +%makeinstall +popd + %pre %service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service @@ -293,12 +273,19 @@ %dir /etc/lvm/backup %dir /etc/lvm/archive %dir /etc/lvm/metadata +%dir /etc/lvm/profile +%dir /etc/lvm/cache +%dir /usr/lib/systemd/system-generators +%dir /usr/lib/tmpfiles.d +%ghost /etc/lvm/cache/.cache +/etc/lvm/profile/*.profile %{_udevdir}/rules.d/11-dm-lvm.rules %{_udevdir}/rules.d/69-dm-lvm-metad.rules %{_unitdir}/blk-availability.service %{_unitdir}/lvm2-monitor.service %{_unitdir}/lvm2-lvmetad.socket %{_unitdir}/lvm2-lvmetad.service +%{_unitdir}/lvm2-pvscan@.service %{_tmpfilesdir}/lvm2.conf %config /etc/lvm/lvm.conf /usr/lib/systemd/system-generators/lvm2-activation-generator @@ -351,6 +338,7 @@ /sbin/vgsplit /sbin/lvmconf /sbin/lvmetad +/usr/sbin/lvm %dir /%_lib/device-mapper /%_lib/device-mapper/libdevmapper-event-lvm2mirror.so /%_lib/device-mapper/libdevmapper-event-lvm2snapshot.so @@ -364,11 +352,13 @@ /%_lib/liblvm2cmd.so.2.02 /%_lib/liblvm2app.so /%_lib/liblvm2app.so.2.2 +/%_libdir/liblvm2app.so +/%_libdir/liblvm2cmd.so /%_lib/libdevmapper-event-lvm2mirror.so.2.02 /%_lib/libdevmapper-event-lvm2snapshot.so.2.02 /%_lib/libdevmapper-event-lvm2raid.so.2.02 /%_lib/libdevmapper-event-lvm2thin.so.2.02 -/%_lib/libdevmapper-event-lvm2.so +/%_libdir/libdevmapper-event-lvm2.so /%_lib/libdevmapper-event-lvm2.so.2.02 %{_mandir}/man5/lvm.conf.5.gz %{_mandir}/man8/blkdeactivate.8.gz @@ -420,10 +410,13 @@ %{_mandir}/man8/lvmsadc.8.gz %{_mandir}/man8/lvmsar.8.gz %{_mandir}/man8/lvmetad.8.gz +%{_mandir}/man7/lvmthin.7.gz +%{_mandir}/man8/lvm-dumpconfig.8.gz +%{_mandir}/man8/lvm2-activation-generator.8.gz %package clvm Url: http://sources.redhat.com/cluster/clvm/ -Version: 2.02.98 +Version: %{lvm2_version} Release: 0 Requires: corosync Requires: device-mapper >= 1.02.25 @@ -450,10 +443,13 @@ %doc README.csm-converter /usr/sbin/csm-converter /usr/sbin/csm-converter-helper +%{_unitdir}/lvm2-clvmd.service +%{_unitdir}/lvm2-cluster-activation.service +/usr/lib/systemd/lvm2-cluster-activation %package cmirrord Url: http://www.sourceware.org/lvm2/ -Version: 2.02.98 +Version: %{lvm2_version} Release: 0 Requires: corosync Requires: device-mapper >= 1.02.25 @@ -472,9 +468,10 @@ /usr/sbin/cmirrord /usr/lib/ocf/resource.d/lvm2/cmirrord %{_mandir}/man8/cmirrord.8.gz +/usr/lib/systemd/system/lvm2-cmirrord.service %package devel -Version: 2.02.98 +Version: %{lvm2_version} Release: 0 Requires: lvm2 = %{version} Summary: Development files for LVM2 @@ -490,4 +487,116 @@ /usr/include/lvm2app.h %_libdir/pkgconfig/lvm2app.pc +########################################## +# Subpackage: device-mapper +########################################## +%package -n device-mapper + +%ifarch ppc64 +Obsoletes: device-mapper-64bit +%endif +Version: %{device_mapper_version} +Release: 0 +Summary: Device Mapper Tools +Group: System/Base +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: boost-devel +BuildRequires: gcc-c++ +BuildRequires: libexpat-devel +BuildRequires: libselinux-devel +BuildRequires: libsepol-devel +BuildRequires: libstdc++-devel +BuildRequires: suse-module-tools +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(libudev) +Requires: expat +PreReq: %insserv_prereq %fillup_prereq + +%description -n device-mapper +Programs, libraries, and man pages for configuring and using the device +mapper. + +%post -n device-mapper +%service_add_post dm-event.service dm-event.socket +/sbin/ldconfig +%{?regenerate_initrd_post} + +%posttrans -n device-mapper +%{?regenerate_initrd_posttrans} + +%pre -n device-mapper +%service_add_pre dm-event.service dm-event.socket + +%preun -n device-mapper +%service_del_preun dm-event.service dm-event.socket + +%postun -n device-mapper +%service_del_postun dm-event.service dm-event.socket +/sbin/ldconfig + +%files -n device-mapper +%defattr(-,root,root) +%doc INSTALL COPYING COPYING.LIB README +%doc udev/12-dm-permissions.rules +/%_lib/libdevmapper.so.1.03 +/%_lib/libdevmapper-event.so.1.03 +/sbin/dmsetup +/sbin/dmeventd +/usr/sbin/thin_check +/usr/sbin/thin_dump +/usr/sbin/thin_restore +/usr/sbin/thin_metadata_size +/usr/sbin/thin_repair +/usr/sbin/thin_rmap +%{_mandir}/man8/dmsetup.8.gz +%{_mandir}/man8/dmeventd.8.gz +%{_mandir}/man8/thin_check.8.gz +%{_mandir}/man8/thin_dump.8.gz +%{_mandir}/man8/thin_restore.8.gz +%{_mandir}/man8/thin_metadata_size.8.gz +%{_mandir}/man8/thin_repair.8.gz +%{_mandir}/man8/thin_rmap.8.gz +%{_udevrulesdir}/10-dm.rules +%{_udevrulesdir}/13-dm-disk.rules +%{_udevrulesdir}/95-dm-notify.rules +%{_unitdir}/dm-event.socket +%{_unitdir}/dm-event.service +/usr/sbin/cache_check +/usr/sbin/cache_dump +/usr/sbin/cache_metadata_size +/usr/sbin/cache_repair +/usr/sbin/cache_restore +/usr/sbin/era_check +/usr/sbin/era_dump +/usr/sbin/era_invalidate +/usr/sbin/era_restore +/usr/sbin/pdata_tools +/usr/share/man/man8/cache_check.8.gz +/usr/share/man/man8/cache_dump.8.gz +/usr/share/man/man8/cache_repair.8.gz +/usr/share/man/man8/cache_restore.8.gz +/usr/share/man/man8/era_check.8.gz +/usr/share/man/man8/era_dump.8.gz +/usr/share/man/man8/era_invalidate.8.gz + +%package -n device-mapper-devel +Summary: Development package for the device mapper +Group: System/Base +Version: %{device_mapper_version} +Release: 0 +Requires: device-mapper = %{device_mapper_version} + +%description -n device-mapper-devel +Files needed for software development using the device mapper + +%files -n device-mapper-devel +%defattr(-,root,root) +/%_libdir/libdevmapper.so +/%_libdir/libdevmapper-event.so +%attr(644, root, root) %_libdir/libdevmapper.a +/usr/include/libdevmapper.h +/usr/include/libdevmapper-event.h +/%_libdir/pkgconfig/devmapper-event.pc +/%_libdir/pkgconfig/devmapper.pc + %changelog ++++++ LVM2.2.02.98.tgz -> LVM2.2.02.111.tgz ++++++ ++++ 109633 lines of diff (skipped) ++++++ cluster_support_mirrord_log.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,7 +1,27 @@ -Index: LVM2.2.02.98/daemons/cmirrord/cluster.c -=================================================================== ---- LVM2.2.02.98.orig/daemons/cmirrord/cluster.c -+++ LVM2.2.02.98/daemons/cmirrord/cluster.c +Subject: Parallelize dispatching +--- + daemons/cmirrord/Makefile.in | 2 + daemons/cmirrord/cluster.c | 110 +++++++++++++++++++++++++++---------------- + daemons/cmirrord/functions.c | 37 ++++++++++++-- + daemons/cmirrord/local.c | 3 - + lib/metadata/mirror.c | 24 --------- + lib/mirror/mirrored.c | 5 + + tools/lvconvert.c | 9 --- + 7 files changed, 109 insertions(+), 81 deletions(-) + +--- a/daemons/cmirrord/Makefile.in ++++ b/daemons/cmirrord/Makefile.in +@@ -26,7 +26,7 @@ TARGETS = cmirrord + + include $(top_builddir)/make.tmpl + +-LIBS += -ldevmapper ++LIBS += -ldevmapper -lpthread + LMLIBS += $(CPG_LIBS) $(SACKPT_LIBS) + CFLAGS += $(CPG_CFLAGS) $(SACKPT_CFLAGS) $(EXTRA_EXEC_CFLAGS) + LDFLAGS += $(EXTRA_EXEC_LDFLAGS) +--- a/daemons/cmirrord/cluster.c ++++ b/daemons/cmirrord/cluster.c @@ -22,6 +22,7 @@ #include <errno.h> #include <signal.h> @@ -10,7 +30,7 @@ #if CMIRROR_HAS_CHECKPOINT #include <openais/saAis.h> #include <openais/saCkpt.h> -@@ -118,9 +119,11 @@ struct clog_cpg { +@@ -151,9 +152,11 @@ struct clog_cpg { struct checkpoint_data *checkpoint_list; int idx; char debugging[DEBUGGING_HISTORY][128]; @@ -18,11 +38,11 @@ }; static struct dm_list clog_cpg_list; -+static pthread_rwlock_t clog_cpg_lock =PTHREAD_RWLOCK_INITIALIZER; ++static pthread_rwlock_t clog_cpg_lock = PTHREAD_RWLOCK_INITIALIZER; /* * cluster_send -@@ -135,12 +138,14 @@ int cluster_send(struct clog_request *rq +@@ -168,12 +171,14 @@ int cluster_send(struct clog_request *rq struct iovec iov; struct clog_cpg *entry; @@ -37,7 +57,7 @@ if (!found) { rq->u_rq.error = -ENOENT; -@@ -221,11 +226,11 @@ static struct clog_request *get_matching +@@ -254,11 +259,11 @@ static struct clog_request *get_matching return NULL; } @@ -50,7 +70,7 @@ struct clog_request *tmp = (struct clog_request *)rq_buffer; /* -@@ -332,9 +337,13 @@ static struct clog_cpg *find_clog_cpg(cp +@@ -369,9 +374,13 @@ static struct clog_cpg *find_clog_cpg(cp { struct clog_cpg *match; @@ -65,7 +85,7 @@ return NULL; } -@@ -939,28 +948,17 @@ static int resend_requests(struct clog_c +@@ -981,34 +990,21 @@ static int resend_requests(struct clog_c return r; } @@ -77,8 +97,16 @@ - - dm_list_iterate_items_safe(entry, tmp, &clog_cpg_list) { - r = cpg_dispatch(entry->handle, CS_DISPATCH_ALL); -- if (r != CS_OK) -- LOG_ERROR("cpg_dispatch failed: %d", r); +- if (r != CS_OK) { +- if ((r == CS_ERR_BAD_HANDLE) && +- ((entry->state == INVALID) || +- (entry->state == LEAVING))) +- /* It's ok if we've left the cluster */ +- r = CS_OK; +- else +- LOG_ERROR("cpg_dispatch failed: %s", +- str_ais_error(r)); +- } - - if (entry->free_me) { - free(entry); @@ -87,30 +115,35 @@ - do_checkpoints(entry, 0); - - resend_requests(entry); -- } -+ struct clog_cpg * match = data; -+ r = cpg_dispatch (match->handle, CS_DISPATCH_BLOCKING); -+ if (r != CS_OK) -+ LOG_DBG("cpg_dispatch failed"); - ++ struct clog_cpg *match = data; ++ r = cpg_dispatch(match->handle, CS_DISPATCH_BLOCKING); ++ if (r != CS_OK) { ++ if ((r == CS_ERR_BAD_HANDLE) && ++ ((match->state == INVALID) || ++ (match->state == LEAVING))) ++ /* It's ok if we've left the cluster */ ++ r = CS_OK; ++ else ++ LOG_ERROR("cpg_dispatch failed: %s", ++ str_ais_error(r)); + } +- - return (r == CS_OK) ? 0 : -1; /* FIXME: good error number? */ } -+ static int flush_startup_list(struct clog_cpg *entry) - { - int r = 0; -@@ -1011,23 +1009,35 @@ static int flush_startup_list(struct clo +@@ -1061,23 +1057,37 @@ static int flush_startup_list(struct clo return 0; } -+static void do_cpg_message_callback(struct clog_cpg * match , uint32_t nodeid, void *msg, size_t msg_len); ++static void do_cpg_message_callback(struct clog_cpg *match, uint32_t nodeid, ++ void *msg, size_t msg_len); + static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute__((unused)), uint32_t nodeid, uint32_t pid __attribute__((unused)), void *msg, size_t msg_len) { -+ struct clog_cpg * entry; ++ struct clog_cpg *entry; + + entry = find_clog_cpg(handle); + if (!entry) { @@ -124,14 +157,15 @@ + +} + -+static void do_cpg_message_callback(struct clog_cpg * match , uint32_t nodeid, void *msg, size_t msg_len) ++static void do_cpg_message_callback(struct clog_cpg *match, uint32_t nodeid, ++ void *msg, size_t msg_len) +{ int i; int r = 0; int i_am_server; int response = 0; struct clog_request *rq = msg; - struct clog_request *tmp_rq; + struct clog_request *tmp_rq, *tmp_rq2; - struct clog_cpg *match; - match = find_clog_cpg(handle); @@ -142,7 +176,7 @@ /* * Perform necessary endian and version compatibility conversions -@@ -1324,7 +1334,7 @@ static void cpg_leave_callback(struct cl +@@ -1373,7 +1383,7 @@ static void cpg_leave_callback(struct cl size_t member_list_entries) { unsigned i; @@ -151,7 +185,7 @@ uint32_t lowest = match->lowest_id; struct clog_request *rq, *n; struct checkpoint_data *p_cp, *c_cp; -@@ -1335,10 +1345,9 @@ static void cpg_leave_callback(struct cl +@@ -1384,10 +1394,9 @@ static void cpg_leave_callback(struct cl /* Am I leaving? */ if (my_cluster_id == left->nodeid) { LOG_DBG("Finalizing leave..."); @@ -164,7 +198,7 @@ cluster_postsuspend(match->name.value, match->luid); -@@ -1466,11 +1475,13 @@ static void cpg_config_callback(cpg_hand +@@ -1515,11 +1524,13 @@ static void cpg_config_callback(cpg_hand struct clog_cpg *match; int found = 0; @@ -178,7 +212,7 @@ if (!found) { LOG_ERROR("Unable to find match for CPG config callback"); -@@ -1487,6 +1498,16 @@ static void cpg_config_callback(cpg_hand +@@ -1536,6 +1547,16 @@ static void cpg_config_callback(cpg_hand else cpg_leave_callback(match, left_list, member_list, member_list_entries); @@ -195,7 +229,7 @@ } cpg_callbacks_t cpg_callbacks = { -@@ -1554,12 +1575,16 @@ int create_cluster_cpg(char *uuid, uint6 +@@ -1603,12 +1624,16 @@ int create_cluster_cpg(char *uuid, uint6 size_t size; struct clog_cpg *new = NULL; struct clog_cpg *tmp; @@ -212,7 +246,7 @@ new = malloc(sizeof(*new)); if (!new) { -@@ -1601,13 +1626,16 @@ int create_cluster_cpg(char *uuid, uint6 +@@ -1650,13 +1675,16 @@ int create_cluster_cpg(char *uuid, uint6 } new->cpg_state = VALID; @@ -232,7 +266,7 @@ return 0; } -@@ -1676,9 +1704,11 @@ int destroy_cluster_cpg(char *uuid) +@@ -1725,9 +1753,11 @@ int destroy_cluster_cpg(char *uuid) { struct clog_cpg *del, *tmp; @@ -244,10 +278,8 @@ return 0; } -Index: LVM2.2.02.98/daemons/cmirrord/functions.c -=================================================================== ---- LVM2.2.02.98.orig/daemons/cmirrord/functions.c -+++ LVM2.2.02.98/daemons/cmirrord/functions.c +--- a/daemons/cmirrord/functions.c ++++ b/daemons/cmirrord/functions.c @@ -19,6 +19,7 @@ #include <sys/stat.h> #include <time.h> @@ -299,7 +331,7 @@ return NULL; } -@@ -517,7 +529,9 @@ static int _clog_ctr(char *uuid, uint64_ +@@ -519,7 +531,9 @@ static int _clog_ctr(char *uuid, uint64_ LOG_DBG("Disk log ready"); } @@ -309,7 +341,7 @@ return 0; fail: -@@ -641,7 +655,10 @@ static int clog_dtr(struct dm_ulog_reque +@@ -643,7 +657,10 @@ static int clog_dtr(struct dm_ulog_reque LOG_DBG("[%s] Cluster log removed", SHORT_UUID(lc->uuid)); @@ -320,7 +352,7 @@ if (lc->disk_fd != -1 && close(lc->disk_fd)) LOG_ERROR("Failed to close disk log: %s", strerror(errno)); -@@ -713,8 +730,13 @@ int cluster_postsuspend(char *uuid, uint +@@ -715,8 +732,13 @@ int cluster_postsuspend(char *uuid, uint lc->resume_override = 0; /* move log to pending list */ @@ -334,7 +366,7 @@ return 0; } -@@ -818,9 +840,9 @@ no_disk: +@@ -820,9 +842,9 @@ no_disk: if (commit_log && (lc->disk_fd >= 0)) { rq->error = write_log(lc); if (rq->error) @@ -346,7 +378,7 @@ lc->touched = 0; } out: -@@ -902,8 +924,13 @@ int local_resume(struct dm_ulog_request +@@ -904,8 +926,13 @@ int local_resume(struct dm_ulog_request } /* move log to official list */ @@ -360,7 +392,7 @@ } return 0; -@@ -1910,7 +1937,6 @@ void log_debug(void) +@@ -1928,7 +1955,6 @@ void log_debug(void) LOG_ERROR(""); LOG_ERROR("LOG COMPONENT DEBUGGING::"); @@ -368,7 +400,7 @@ LOG_ERROR("Pending log list:"); dm_list_iterate_items(lc, &log_pending_list) { LOG_ERROR("%s", lc->uuid); -@@ -1920,6 +1946,7 @@ void log_debug(void) +@@ -1938,6 +1964,7 @@ void log_debug(void) print_bits(lc->clean_bits, 1); } @@ -376,10 +408,8 @@ dm_list_iterate_items(lc, &log_list) { LOG_ERROR("%s", lc->uuid); LOG_ERROR(" recoverer : %" PRIu32, lc->recoverer); -Index: LVM2.2.02.98/daemons/cmirrord/local.c -=================================================================== ---- LVM2.2.02.98.orig/daemons/cmirrord/local.c -+++ LVM2.2.02.98/daemons/cmirrord/local.c +--- a/daemons/cmirrord/local.c ++++ b/daemons/cmirrord/local.c @@ -29,13 +29,13 @@ static int cn_fd = -1; /* Connector (netlink) socket fd */ @@ -403,11 +433,9 @@ memset(send_buf, 0, sizeof(send_buf)); -Index: LVM2.2.02.98/lib/metadata/mirror.c -=================================================================== ---- LVM2.2.02.98.orig/lib/metadata/mirror.c -+++ LVM2.2.02.98/lib/metadata/mirror.c -@@ -1909,10 +1909,6 @@ int add_mirror_log(struct cmd_context *c +--- a/lib/metadata/mirror.c ++++ b/lib/metadata/mirror.c +@@ -1946,10 +1946,6 @@ int add_mirror_log(struct cmd_context *c unsigned old_log_count; int r = 0; @@ -418,15 +446,16 @@ if (dm_list_size(&lv->segments) != 1) { log_error("Multiple-segment mirror is not supported"); -@@ -2076,25 +2072,6 @@ int lv_add_mirrors(struct cmd_context *c +@@ -2113,26 +2109,6 @@ int lv_add_mirrors(struct cmd_context *c return 0; } - if (vg_is_clustered(lv->vg)) { -- /* FIXME: review check of lv_is_active_remotely */ - /* FIXME: move this test out of this function */ - /* Skip test for pvmove mirrors, it can use local mirror */ - if (!(lv->status & (PVMOVE | LOCKED)) && +- lv_is_active(lv) && +- !lv_is_active_exclusive_locally(lv) && /* lv_is_active_remotely */ - !_cluster_mirror_is_available(lv)) { - log_error("Shared cluster mirrors are not available."); - return 0; @@ -444,32 +473,28 @@ /* For corelog mirror, activation code depends on * the global mirror_in_sync status. As we are adding -Index: LVM2.2.02.98/lib/mirror/mirrored.c -=================================================================== ---- LVM2.2.02.98.orig/lib/mirror/mirrored.c -+++ LVM2.2.02.98/lib/mirror/mirrored.c -@@ -366,12 +366,15 @@ static int _add_log(struct dm_pool *mem, +--- a/lib/mirror/mirrored.c ++++ b/lib/mirror/mirrored.c +@@ -361,12 +361,15 @@ static int _add_log(struct dm_pool *mem, return 0; } } else { - /* If core log, use mirror's UUID and set DM_CORELOG flag */ + /* If core log, use mirror's (UUID + CORE) and set DM_CORELOG flag */ - if (!(log_dlid = build_dm_uuid(mem, seg->lv->lvid.s, NULL))) { + if (!(log_dlid = build_dm_uuid(mem, seg->lv, NULL))) { log_error("Failed to build uuid for mirror LV %s.", seg->lv->name); return 0; } + if (clustered) -+ memcpy(&(log_dlid[strlen(log_dlid)-4]),"CORE",4); ++ memcpy(&log_dlid[strlen(log_dlid) - 4], "CORE", 4); + log_flags |= DM_CORELOG; } -Index: LVM2.2.02.98/tools/lvconvert.c -=================================================================== ---- LVM2.2.02.98.orig/tools/lvconvert.c -+++ LVM2.2.02.98/tools/lvconvert.c -@@ -1115,15 +1115,6 @@ static int _lvconvert_mirrors_parse_para +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -1364,15 +1364,6 @@ static int _lvconvert_mirrors_parse_para return 0; } @@ -485,16 +510,3 @@ log_verbose("Setting logging type to %s", mirrorlog); /* -Index: LVM2.2.02.98/daemons/cmirrord/Makefile.in -=================================================================== ---- LVM2.2.02.98.orig/daemons/cmirrord/Makefile.in -+++ LVM2.2.02.98/daemons/cmirrord/Makefile.in -@@ -26,7 +26,7 @@ TARGETS = cmirrord - - include $(top_builddir)/make.tmpl - --LIBS += -ldevmapper -+LIBS += -ldevmapper -lpthread - LMLIBS += $(CPG_LIBS) $(SACKPT_LIBS) - CFLAGS += $(CPG_CFLAGS) $(SACKPT_CFLAGS) - ++++++ cmirrord-fix-s390-endian-issue.patch ++++++ Index: LVM2.2.02.98/daemons/cmirrord/compat.c =================================================================== --- LVM2.2.02.98.orig/daemons/cmirrord/compat.c +++ LVM2.2.02.98/daemons/cmirrord/compat.c @@ -126,13 +126,13 @@ static int v5_endian_to_network(struct c u_rq->error = xlate32(u_rq->error); u_rq->seq = xlate32(u_rq->seq); - u_rq->request_type = xlate32(u_rq->request_type); - u_rq->data_size = xlate64(u_rq->data_size); - rq->originator = xlate32(rq->originator); v5_data_endian_switch(rq, 1); + u_rq->request_type = xlate32(u_rq->request_type); + u_rq->data_size = xlate32(u_rq->data_size); + return size; } @@ -167,7 +167,7 @@ static int v5_endian_from_network(struct u_rq->error = xlate32(u_rq->error); u_rq->seq = xlate32(u_rq->seq); u_rq->request_type = xlate32(u_rq->request_type); - u_rq->data_size = xlate64(u_rq->data_size); + u_rq->data_size = xlate32(u_rq->data_size); rq->originator = xlate32(rq->originator); @@ -187,7 +187,7 @@ int clog_request_from_network(void *data switch (version) { case 5: /* Upstream */ - if (version == unconverted_version) + if (version == vp[0]) return 0; break; case 4: /* RHEL 5.[45] */ ++++++ cmirrord_improvment_performance.patch ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,8 +1,8 @@ -diff --git a/daemons/cmirrord/cluster.c b/daemons/cmirrord/cluster.c -index fea739a..aa35f62 100644 ---- a/daemons/cmirrord/cluster.c -+++ b/daemons/cmirrord/cluster.c -@@ -353,6 +353,10 @@ static int handle_cluster_response(struct clog_cpg *entry, +Index: LVM2.2.02.111/daemons/cmirrord/cluster.c +=================================================================== +--- LVM2.2.02.111.orig/daemons/cmirrord/cluster.c ++++ LVM2.2.02.111/daemons/cmirrord/cluster.c +@@ -358,6 +358,10 @@ static int handle_cluster_response(struc /* FIXME: Ensure memcpy cannot explode */ memcpy(orig_rq, rq, sizeof(*rq) + rq->u_rq.data_size); @@ -13,11 +13,11 @@ r = kernel_send(&orig_rq->u_rq); if (r) LOG_ERROR("Failed to send response to kernel"); -diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c -index f6e0918..c1c3538 100644 ---- a/daemons/cmirrord/functions.c -+++ b/daemons/cmirrord/functions.c -@@ -362,7 +362,7 @@ static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_pat +Index: LVM2.2.02.111/daemons/cmirrord/functions.c +=================================================================== +--- LVM2.2.02.111.orig/daemons/cmirrord/functions.c ++++ LVM2.2.02.111/daemons/cmirrord/functions.c +@@ -374,7 +374,7 @@ static int find_disk_path(char *major_mi // return r ? -errno : 0; } @@ -26,7 +26,7 @@ int argc, char **argv, uint64_t device_size) { int i; -@@ -431,6 +431,8 @@ static int _clog_ctr(char *uuid, uint64_t luid, +@@ -443,6 +443,8 @@ static int _clog_ctr(char *uuid, uint64_ log_sync = NOSYNC; else if (!strcmp(argv[i], "block_on_error")) block_on_error = 1; @@ -35,7 +35,7 @@ } lc = dm_zalloc(sizeof(*lc)); -@@ -594,7 +596,7 @@ static int clog_ctr(struct dm_ulog_request *rq) +@@ -608,7 +610,7 @@ static int clog_ctr(struct dm_ulog_reque return -EINVAL; } @@ -44,7 +44,7 @@ /* We join the CPG when we resume */ -@@ -1026,12 +1028,14 @@ static int clog_in_sync(struct dm_ulog_request *rq) +@@ -1053,12 +1055,14 @@ static int clog_in_sync(struct dm_ulog_r return 0; } @@ -60,7 +60,7 @@ { int r = 0; struct log_c *lc = get_log(rq->uuid, rq->luid); -@@ -1042,6 +1046,15 @@ static int clog_flush(struct dm_ulog_request *rq, int server) +@@ -1069,6 +1073,15 @@ static int clog_flush(struct dm_ulog_req if (!lc->touched) return 0; @@ -76,7 +76,7 @@ /* * Do the actual flushing of the log only * if we are the server. -@@ -1104,25 +1117,11 @@ static int mark_region(struct log_c *lc, uint64_t region, uint32_t who) +@@ -1131,25 +1144,11 @@ static int mark_region(struct log_c *lc, return 0; } @@ -103,7 +103,7 @@ if (rq->data_size % sizeof(uint64_t)) { LOG_ERROR("Bad data size given for mark_region request"); return -EINVAL; -@@ -1142,6 +1141,25 @@ static int clog_mark_region(struct dm_ulog_request *rq, uint32_t originator) +@@ -1169,6 +1168,25 @@ static int clog_mark_region(struct dm_ul return 0; } @@ -129,7 +129,7 @@ static int clear_region(struct log_c *lc, uint64_t region, uint32_t who) { int other_matches = 0; -@@ -1673,7 +1691,7 @@ int do_request(struct clog_request *rq, int server) +@@ -1700,7 +1718,7 @@ int do_request(struct clog_request *rq, r = clog_in_sync(&rq->u_rq); break; case DM_ULOG_FLUSH: @@ -138,18 +138,24 @@ break; case DM_ULOG_MARK_REGION: r = clog_mark_region(&rq->u_rq, rq->originator); -diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c -index 752a44b..fb78cb6 100644 ---- a/libdm/libdm-deptree.c -+++ b/libdm/libdm-deptree.c -@@ -2164,6 +2164,10 @@ static int _mirror_emit_segment_line(struct dm_task *dmt, struct load_segment *s - if (block_on_error) - EMIT_PARAMS(pos, " block_on_error"); +Index: LVM2.2.02.111/libdm/libdm-deptree.c +=================================================================== +--- LVM2.2.02.111.orig/libdm/libdm-deptree.c ++++ LVM2.2.02.111/libdm/libdm-deptree.c +@@ -2254,10 +2254,12 @@ static int _mirror_emit_segment_line(str + return_0; + } +- if (dm_log_userspace) +- EMIT_PARAMS(pos, "userspace %u %s clustered-%s", +- log_parm_count, seg->uuid, logtype); +- else + /* for cluster raid1, use integrated flush to improve performance */ -+ if (dm_log_userspace) -+ EMIT_PARAMS(pos, " integrated_flush"); -+ - EMIT_PARAMS(pos, " %u ", seg->mirror_area_count); ++ if (dm_log_userspace) { ++ log_parm_count ++; /* for integrated_flush */ ++ EMIT_PARAMS(pos, "userspace %u %s %s clustered-%s", ++ log_parm_count, seg->uuid, "integrated_flush", logtype); ++ } else + EMIT_PARAMS(pos, "%s %u", logtype, log_parm_count); - if (_emit_areas_line(dmt, seg, params, paramsize, &pos) <= 0) + if (seg->log) ++++++ device-mapper-dmsetup-export.patch ++++++ Index: LVM2.2.02.110/man/dmsetup.8.in =================================================================== --- LVM2.2.02.110.orig/man/dmsetup.8.in +++ LVM2.2.02.110/man/dmsetup.8.in @@ -45,6 +45,9 @@ dmsetup \(em low level logical volume ma .RI [ device_name ] .RE .br +.B dmsetup export +.I [device_name] +.br .B dmsetup load .I device_name .RB [ \-\-table @@ -309,6 +312,10 @@ device_name in subsequent dmsetup comman If successful a device will appear as /dev/mapper/<device-name>. See below for information on the table format. +.IP \fBexport +.I [device_name] +.br +Outputs information in key/value format to be imported by other programs. .br .TP .B deps Index: LVM2.2.02.110/tools/dmsetup.c =================================================================== --- LVM2.2.02.110.orig/tools/dmsetup.c +++ LVM2.2.02.110/tools/dmsetup.c @@ -1733,6 +1733,129 @@ static int _status(CMD_ARGS) return r; } +static int _export(CMD_ARGS) +{ + int r = 0; + struct dm_task *dmt = NULL; + void *next = NULL; + uint64_t start, length; + char *target_type = NULL; + char *params; + const char *name = NULL; + const char *old_name = NULL; + const char *uuid = NULL; + struct dm_info info; + struct dm_deps *deps; + + if (names) + name = names->name; + else if (argc == 2) + name = argv[1]; + old_name = name; + + if (!(dmt = dm_task_create(DM_DEVICE_STATUS))) + goto out; + + if (!_set_task_device(dmt, name, 0)) + goto out; + + if (!dm_task_run(dmt)) + goto out; + + if (!dm_task_get_info(dmt, &info) || !info.exists) + goto out; + + if (!name) + name = dm_task_get_name(dmt); + + uuid = dm_task_get_uuid(dmt); + printf("DM_NAME=%s\n", name); + + if ((uuid = dm_task_get_uuid(dmt)) && *uuid) + printf("DM_UUID=%s\n", uuid); + + if (!info.exists) { + printf("DM_STATE=NOTPRESENT\n"); + goto out; + } + + if (!name) + name = dm_task_get_name(dmt); + + uuid = dm_task_get_uuid(dmt); + printf("DM_NAME=%s\n", name); + + if ((uuid = dm_task_get_uuid(dmt)) && *uuid) + printf("DM_UUID=%s\n", uuid); + + if (!info.exists) { + printf("DM_STATE=NOTPRESENT\n"); + goto out; + } + + printf("DM_STATE=%s\n", + info.suspended ? "SUSPENDED" : + (info.read_only ? "READONLY" : "ACTIVE")); + + if (!info.live_table && !info.inactive_table) + printf("DM_TABLE_STATE=NONE\n"); + else + printf("DM_TABLE_STATE=%s%s%s\n", + info.live_table ? "LIVE" : "", + info.live_table && info.inactive_table ? "/" : "", + info.inactive_table ? "INACTIVE" : ""); + + if (info.open_count != -1) + printf("DM_OPENCOUNT=%d\n", info.open_count); + + printf("DM_LAST_EVENT_NR=%" PRIu32 "\n", info.event_nr); + + printf("DM_MAJOR=%d\n", info.major); + printf("DM_MINOR=%d\n", info.minor); + + if (info.target_count != -1) + printf("DM_TARGET_COUNT=%d\n", info.target_count); + + /* export all table types */ + next = dm_get_next_target(dmt, next, &start, &length, + &target_type, ¶ms); + if (target_type) { + printf("DM_TARGET_TYPES=%s", target_type); + while (next) { + next = dm_get_next_target(dmt, next, &start, &length, + &target_type, ¶ms); + if (target_type) + printf(",%s", target_type); + } + printf("\n"); + } + + dm_task_destroy(dmt); + + // bnc#707614, revert to the original name + + if (!(dmt = dm_task_create(DM_DEVICE_DEPS))) + goto out; + + name = old_name; + if (!_set_task_device(dmt, name, 0)) + goto out; + + if (!dm_task_run(dmt)) + goto out; + + if (!(deps = dm_task_get_deps(dmt))) + goto out; + + printf("DM_DEPS=%d\n", deps->count); + + r = 1; + out: + if (dmt) + dm_task_destroy(dmt); + return r; +} + /* Show target names and their version numbers */ static int _targets(CMD_ARGS) { @@ -3086,6 +3209,7 @@ static struct command _commands[] = { {"info", "[<device>]", 0, -1, 1, _info}, {"deps", "[-o options] [<device>]", 0, -1, 1, _deps}, {"status", "[<device>] [--noflush] [--target <target_type>]", 0, -1, 1, _status}, + {"export", "[<device>]", 0, -1, 1, _export}, {"table", "[<device>] [--target <target_type>] [--showkeys]", 0, -1, 1, _status}, {"wait", "<device> [<event_nr>] [--noflush]", 0, 2, 0, _wait}, {"mknodes", "[<device>]", 0, -1, 1, _mknodes}, ++++++ device-mapper-gcc-warnings.patch ++++++ Index: LVM2.2.02.109/libdm/datastruct/hash.c =================================================================== --- LVM2.2.02.109.orig/libdm/datastruct/hash.c +++ LVM2.2.02.109/libdm/datastruct/hash.c @@ -19,7 +19,7 @@ struct dm_hash_node { struct dm_hash_node *next; void *data; unsigned keylen; - char key[0]; + unsigned char key[0]; }; struct dm_hash_table { @@ -136,7 +136,7 @@ void dm_hash_destroy(struct dm_hash_tabl static struct dm_hash_node **_find(struct dm_hash_table *t, const void *key, uint32_t len) { - unsigned h = _hash(key, len) & (t->num_slots - 1); + unsigned h = _hash((unsigned char *)key, len) & (t->num_slots - 1); struct dm_hash_node **c; for (c = &t->slots[h]; *c; c = &((*c)->next)) { @@ -235,7 +235,8 @@ void dm_hash_wipe(struct dm_hash_table * char *dm_hash_get_key(struct dm_hash_table *t __attribute__((unused)), struct dm_hash_node *n) { - return n->key; + return (char *)n->key; + } void *dm_hash_get_data(struct dm_hash_table *t __attribute__((unused)), Index: LVM2.2.02.109/libdm/ioctl/libdm-iface.c =================================================================== --- LVM2.2.02.109.orig/libdm/ioctl/libdm-iface.c +++ LVM2.2.02.109/libdm/ioctl/libdm-iface.c @@ -1751,7 +1751,7 @@ static struct dm_ioctl *_do_dm_ioctl(str dmt->secure_data ? "W " : "", dmt->query_inactive_table ? "I " : "", dmt->enable_checks ? "C" : "", - dmt->sector, _sanitise_message(dmt->message), + (unsigned long long int)dmt->sector, _sanitise_message(dmt->message), dmi->data_size, retry_repeat_count); #ifdef DM_IOCTLS if (ioctl(_control_fd, command, dmi) < 0 && ++++++ device-mapper-link ++++++ Make sure /dev/device-mapper exists as a link to /dev/mapper/control Resolves: bnc#724578 Signed-off-by: NeilBrown <ne...@suse.de> --- udev/10-dm.rules.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- LVM2.2.02.84.orig/udev/10-dm.rules.in +++ LVM2.2.02.84/udev/10-dm.rules.in @@ -14,7 +14,7 @@ # DM_SUSPENDED - suspended state of DM device (0 or 1) # DM_UDEV_RULES_VSN - DM udev rules version -KERNEL=="device-mapper", NAME="(DM_DIR)/control" +KERNEL=="device-mapper", NAME="(DM_DIR)/control", SYMLINK+="device-mapper" SUBSYSTEM!="block", GOTO="dm_end" KERNEL!="dm-[0-9]*", GOTO="dm_end" ++++++ device-mapper-static.patch ++++++ Index: LVM2.2.02.109/libdm/Makefile.in =================================================================== --- LVM2.2.02.109.orig/libdm/Makefile.in +++ LVM2.2.02.109/libdm/Makefile.in @@ -39,9 +39,9 @@ INCLUDES += @VALGRIND_CFLAGS@ endif CFLAGS += $(UDEV_CFLAGS) -ifeq ("@STATIC_LINK@", "yes") +#ifeq ("@STATIC_LINK@", "yes") LIB_STATIC = $(interface)/libdevmapper.a -endif +#endif LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_DM) @@ -71,9 +71,9 @@ libdevmapper.$(LIB_SUFFIX) libdevmapper. INSTALL_TYPE = install_dynamic -ifeq ("@STATIC_LINK@", "yes") +#ifeq ("@STATIC_LINK@", "yes") INSTALL_TYPE += install_static -endif +#endif ifeq ("@PKGCONFIG@", "yes") INSTALL_TYPE += install_pkgconfig ++++++ device-mapper-type_punning.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -2,8 +2,8 @@ lib/device/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- LVM2.2.02.98.orig/lib/device/device.c -+++ LVM2.2.02.98/lib/device/device.c +--- LVM2.2.02.98.orig/lib/device/dev-type.c ++++ LVM2.2.02.98/lib/device/dev-type.c @@ -39,7 +39,7 @@ struct partition { uint8_t end_cyl; uint32_t start_sect; @@ -11,5 +11,5 @@ -} __attribute__((packed)); +} __attribute__((packed,may_alias)); - static int _is_partitionable(struct device *dev) + static int _is_partitionable(struct dev_types *dt, struct device *dev) { ++++++ display-dm-name-for-lv-name.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,14 +1,33 @@ --- - lib/config/defaults.h | 1 + - lib/display/display.c | 14 ++++++++++---- - lib/display/display.h | 1 + - 3 files changed, 12 insertions(+), 4 deletions(-) + lib/config/config_settings.h | 1 + + lib/config/defaults.h | 1 + + lib/display/display.c | 14 ++++++++++---- + lib/display/display.h | 1 + + 4 files changed, 13 insertions(+), 4 deletions(-) -Index: LVM2.2.02.98/lib/display/display.c -=================================================================== ---- LVM2.2.02.98.orig/lib/display/display.c 2012-10-15 22:24:58.000000000 +0800 -+++ LVM2.2.02.98/lib/display/display.c 2014-03-20 12:24:55.761578040 +0800 -@@ -535,10 +535,16 @@ int lvdisplay_full(struct cmd_context *c +--- a/lib/config/config_settings.h ++++ b/lib/config/config_settings.h +@@ -187,6 +187,7 @@ cfg_array(global_cache_check_options_CFG + cfg(global_cache_dump_executable_CFG, "cache_dump_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_DUMP_CMD, vsn(2, 2, 108), NULL) + cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_REPAIR_CMD, vsn(2, 2, 108), NULL) + cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL) ++cfg(global_display_dm_name_for_lv_name_CFG, "display_dm_name_for_lv_name", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME, vsn(2, 2, 98), NULL) + + cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION_CHECKS, vsn(2, 2, 86), NULL) + cfg(activation_udev_sync_CFG, "udev_sync", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_SYNC, vsn(2, 2, 51), NULL) +--- a/lib/config/defaults.h ++++ b/lib/config/defaults.h +@@ -31,6 +31,7 @@ + #define DEFAULT_PROC_DIR "/proc" + #define DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV 1 + #define DEFAULT_SYSFS_SCAN 1 ++#define DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME 0 + #define DEFAULT_MD_COMPONENT_DETECTION 1 + #define DEFAULT_MD_CHUNK_ALIGNMENT 1 + #define DEFAULT_IGNORE_LVM_MIRRORS 1 +--- a/lib/display/display.c ++++ b/lib/display/display.c +@@ -461,10 +461,15 @@ int lvdisplay_full(struct cmd_context *c lv->vg->cmd->dev_dir, lv->vg->name, lv->name); else if (lv_is_visible(lv)) { /* Thin pool does not have /dev/vg/name link */ @@ -17,8 +36,7 @@ - lv->vg->cmd->dev_dir, - lv->vg->name, lv->name); + if (!lv_is_thin_pool(lv)) { -+ if (find_config_tree_bool(cmd, "global/display_dm_name_for_lv_name", -+ DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME)) { ++ if (find_config_tree_bool(cmd, global_display_dm_name_for_lv_name_CFG, NULL)) { + log_print("LV Path %smapper/%s-%s", lv->vg->cmd->dev_dir, + lv->vg->name, lv->name); + } else { @@ -29,27 +47,3 @@ log_print("LV Name %s", lv->name); } else log_print("Internal LV Name %s", lv->name); -Index: LVM2.2.02.98/lib/display/display.h -=================================================================== ---- LVM2.2.02.98.orig/lib/display/display.h 2014-03-20 12:24:30.403397837 +0800 -+++ LVM2.2.02.98/lib/display/display.h 2014-03-20 12:24:55.761578040 +0800 -@@ -18,6 +18,7 @@ - - #include "metadata-exported.h" - #include "locking.h" -+#include "defaults.h" - - #include <stdint.h> - -Index: LVM2.2.02.98/lib/config/defaults.h -=================================================================== ---- LVM2.2.02.98.orig/lib/config/defaults.h 2014-03-20 12:24:30.403397837 +0800 -+++ LVM2.2.02.98/lib/config/defaults.h 2014-03-20 12:25:27.958815335 +0800 -@@ -31,6 +31,7 @@ - #define DEFAULT_PROC_DIR "/proc" - #define DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV 1 - #define DEFAULT_SYSFS_SCAN 1 -+#define DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME 0 - #define DEFAULT_MD_COMPONENT_DETECTION 1 - #define DEFAULT_MD_CHUNK_ALIGNMENT 1 - #define DEFAULT_MULTIPATH_COMPONENT_DETECTION 1 ++++++ fix-closedown-before-thread-finish.patch ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,7 +1,11 @@ -Index: LVM2.2.02.98/daemons/clvmd/clvmd-corosync.c -=================================================================== ---- LVM2.2.02.98.orig/daemons/clvmd/clvmd-corosync.c 2014-04-14 14:08:40.547558968 +0800 -+++ LVM2.2.02.98/daemons/clvmd/clvmd-corosync.c 2014-04-14 14:09:30.440619510 +0800 +--- + daemons/clvmd/clvmd-corosync.c | 6 +++- + daemons/clvmd/clvmd.c | 53 ++++++++++++++++++++++++++++++++++++++++- + daemons/clvmd/clvmd.h | 2 + + 3 files changed, 59 insertions(+), 2 deletions(-) + +--- a/daemons/clvmd/clvmd-corosync.c ++++ b/daemons/clvmd/clvmd-corosync.c @@ -251,8 +251,12 @@ static void corosync_cpg_confchg_callbac ninfo = dm_hash_lookup_binary(node_hash, (char *)&left_list[i].nodeid, @@ -16,17 +20,15 @@ } num_nodes = member_list_entries; -Index: LVM2.2.02.98/daemons/clvmd/clvmd.c -=================================================================== ---- LVM2.2.02.98.orig/daemons/clvmd/clvmd.c 2014-04-14 14:08:40.582559010 +0800 -+++ LVM2.2.02.98/daemons/clvmd/clvmd.c 2014-04-14 14:09:59.751655009 +0800 -@@ -1602,6 +1602,56 @@ static void process_remote_command(struc - free(replyargs); +--- a/daemons/clvmd/clvmd.c ++++ b/daemons/clvmd/clvmd.c +@@ -1613,6 +1613,57 @@ static void process_remote_command(struc + dm_free(replyargs); } -+void decrease_inflight_expected_reply(char *nodename) ++void decrease_inflight_expected_reply(const char *nodename) +{ -+ struct local_client * thisfd; ++ struct local_client *thisfd; + struct node_reply *reply; + + DEBUGLOG("remote node %s down", nodename); @@ -34,30 +36,33 @@ + for (thisfd = &local_client_head; thisfd != NULL; + thisfd = thisfd->next) { + /* in-flight request */ -+ if (thisfd->type == LOCAL_SOCK -+ && thisfd->bits.localsock.sent_out -+ && thisfd->bits.localsock.in_progress -+ && ! thisfd->bits.localsock.finished -+ && thisfd->bits.localsock.expected_replies > -+ thisfd->bits.localsock.num_replies) { ++ if (thisfd->type == LOCAL_SOCK && ++ thisfd->bits.localsock.sent_out && ++ thisfd->bits.localsock.in_progress && ++ !thisfd->bits.localsock.finished && ++ thisfd->bits.localsock.expected_replies > ++ thisfd->bits.localsock.num_replies) { + -+ pthread_mutex_lock(&thisfd->bits.localsock.reply_mutex); ++ pthread_mutex_lock(&thisfd->bits.localsock.mutex); + + reply = thisfd->bits.localsock.replies; + while (reply && strcmp(reply->node, nodename) != 0) { + reply = reply->next; + } -+ /* if the remote down server has replies,do not decrease the expected_replies */ ++ /* ++ * if the remote down server has replies, ++ * do not decrease the expected_replies ++ */ + if (reply) + continue; + + thisfd->bits.localsock.expected_replies--; -+ DEBUGLOG -+ ("remote node down, decrement the expected replies to (%ld),num_replies(%ld)", ++ DEBUGLOG("remote node down, decrement the expected replies to (%d), num_replies(%d)", + thisfd->bits.localsock.expected_replies, -+ thisfd->bits.localsock.num_replies) ++ thisfd->bits.localsock.num_replies); + -+ if (thisfd->bits.localsock.expected_replies <= thisfd->bits.localsock.num_replies) { ++ if (thisfd->bits.localsock.expected_replies <= ++ thisfd->bits.localsock.num_replies) { + /* tell pre_and_post thread to finish */ + if (thisfd->bits.localsock.threadid) { + thisfd->bits.localsock.all_success = 0; @@ -67,35 +72,31 @@ + pthread_mutex_unlock(&thisfd->bits.localsock.mutex); + } + } -+ pthread_mutex_unlock(&thisfd->bits.localsock.reply_mutex); -+ ++ pthread_mutex_unlock(&thisfd->bits.localsock.mutex); + } + } -+ +} + /* Add a reply to a command to the list of replies for this client. If we have got a full set then send them to the waiting client down the local socket */ -@@ -1643,7 +1693,7 @@ static void add_reply_to_list(struct loc - client->bits.localsock.expected_replies); +@@ -1652,7 +1703,7 @@ static void add_reply_to_list(struct loc - /* If we have the whole lot then do the post-process */ -- if (++client->bits.localsock.num_replies == -+ if (++client->bits.localsock.num_replies >= - client->bits.localsock.expected_replies) { + /* If we have the whole lot then do the post-process */ /* Post-process the command */ - if (client->bits.localsock.threadid) { -Index: LVM2.2.02.98/daemons/clvmd/clvmd.h -=================================================================== ---- LVM2.2.02.98.orig/daemons/clvmd/clvmd.h 2014-04-14 14:08:40.564558988 +0800 -+++ LVM2.2.02.98/daemons/clvmd/clvmd.h 2014-04-14 14:09:30.442619512 +0800 -@@ -112,6 +112,8 @@ extern int do_post_command(struct local_ +- if (++client->bits.localsock.num_replies == ++ if (++client->bits.localsock.num_replies >= + client->bits.localsock.expected_replies) { + client->bits.localsock.state = POST_COMMAND; + pthread_cond_signal(&client->bits.localsock.cond); +--- a/daemons/clvmd/clvmd.h ++++ b/daemons/clvmd/clvmd.h +@@ -110,6 +110,8 @@ extern int do_post_command(struct local_ extern void cmd_client_cleanup(struct local_client *client); extern int add_client(struct local_client *new_client); + -+extern void decrease_inflight_expected_reply(); ++extern void decrease_inflight_expected_reply(const char *nodename); extern void clvmd_cluster_init_completed(void); extern void process_message(struct local_client *client, char *buf, int len, const char *csid); ++++++ improve-mirror-legs-on-different-tag-pvs.patch ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -13,22 +13,23 @@ Signed-off-by: Guangliang Zhao <gz...@suse.com> --- - lib/metadata/lv_manip.c | 25 ++++++++++++++++++++++--- - 1 file changed, 22 insertions(+), 3 deletions(-) + lib/metadata/lv_manip.c | 34 +++++++++++++++++++++++++++++++--- + 1 file changed, 31 insertions(+), 3 deletions(-) -diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c -index fb0199f..edafdf1 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c -@@ -1658,6 +1658,21 @@ static uint32_t _calc_required_extents(struct alloc_handle *ah, struct pv_area * +@@ -2481,6 +2481,25 @@ static uint32_t _calc_required_extents(s return required; } -+static void _replace_required_area(struct alloc_handle *ah, uint32_t max_to_allocate, ++static void _replace_required_area(struct alloc_handle *ah, ++ uint32_t max_to_allocate, + unsigned ix_pva, struct pv_area *pva, -+ struct alloc_state *alloc_state, alloc_policy_t alloc) ++ struct alloc_state *alloc_state, ++ alloc_policy_t alloc) +{ -+ uint32_t required = _calc_required_extents(ah, pva, ix_pva, max_to_allocate, alloc); ++ uint32_t required = _calc_required_extents(ah, pva, ix_pva, ++ max_to_allocate, alloc); + + /* + * We don't worry about the area replaced, because _clear_areas() and @@ -36,36 +37,39 @@ + * the alloc_state and reserved areas every time. + */ + if (required > alloc_state->areas[ix_pva - 1].used) -+ _reserve_area(&alloc_state->areas[ix_pva - 1], pva, required, ix_pva, pva->unreserved); ++ _reserve_area(alloc_state, pva, required, ix_pva - 1, ++ pva->unreserved); +} + - static int _reserve_required_area(struct alloc_handle *ah, uint32_t max_to_allocate, - unsigned ix_pva, struct pv_area *pva, - struct alloc_state *alloc_state, alloc_policy_t alloc) -@@ -1767,6 +1782,7 @@ static int _find_some_parallel_space(struct alloc_handle *ah, const struct alloc + static void _clear_areas(struct alloc_state *alloc_state) { + uint32_t s; +@@ -2575,6 +2594,7 @@ static int _find_some_parallel_space(str + const struct alloc_parms *alloc_parms = alloc_state->alloc_parms; unsigned ix = 0; unsigned last_ix; + int ret; struct pv_map *pvm; struct pv_area *pva; unsigned preferred_count = 0; -@@ -1875,9 +1891,12 @@ static int _find_some_parallel_space(struct alloc_handle *ah, const struct alloc +@@ -2695,9 +2715,17 @@ static int _find_some_parallel_space(str continue; case USE_AREA: - if(check_areas_separate_tags(ah, alloc_state, ix_offset, - ix + ix_offset, pva) >= 0) - goto next_pv; -+ if((ret = check_areas_separate_tags(ah, alloc_state, ix_offset, -+ ix + ix_offset, pva)) >= 0) { -+ _replace_required_area(ah, max_to_allocate, ret + 1, -+ pva, alloc_state, alloc_parms->alloc); ++ ret = check_areas_separate_tags(ah, ++ alloc_state, ix_offset, ++ ix + ix_offset, pva); ++ if (ret >= 0) { ++ _replace_required_area(ah, ++ max_to_allocate, ++ ret + 1, pva, ++ alloc_state, ++ alloc_parms->alloc); + continue; + } /* * Except with ALLOC_ANYWHERE, replace first area with this --- -1.7.10.4 - ++++++ improve_probing.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,39 +1,30 @@ ---- - lib/filters/filter.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - ---- LVM2.2.02.98.orig/lib/filters/filter.c -+++ LVM2.2.02.98/lib/filters/filter.c -@@ -13,6 +13,12 @@ +Index: LVM2.2.02.111/lib/filters/filter-type.c +=================================================================== +--- LVM2.2.02.111.orig/lib/filters/filter-type.c ++++ LVM2.2.02.111/lib/filters/filter-type.c +@@ -12,6 +12,11 @@ + * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +#include <sys/ioctl.h> +#include <linux/fs.h> +#undef MAJOR +#undef MINOR +#undef MKDEV -+ + #include "lib.h" - #include "dev-cache.h" #include "filter.h" -@@ -111,11 +117,18 @@ static int _passes_lvm_type_device_filte - } - - /* Check it's accessible */ -- if (!dev_open_readonly_quiet(dev)) { -+ if (!dev_open_flags(dev, O_RDONLY|O_NONBLOCK, 1, 1)) { - log_debug("%s: Skipping: open failed", name); +@@ -28,6 +33,13 @@ static int _passes_lvm_type_device_filte return 0; } -+ /* Skip cdrom device */ -+ #define CDROM_GET_CAPABILITY 0x5331 -+ if (ioctl(dev->fd, CDROM_GET_CAPABILITY) >= 0) { -+ log_debug("%s: Skipping: cdrom device", name ); -+ goto out; -+ } ++ /* Skip cdrom device */ ++ #define CDROM_GET_CAPABILITY 0x5331 ++ if (ioctl(dev->fd, CDROM_GET_CAPABILITY) >= 0) { ++ log_debug_devs("%s: Skipping: cdrom device", name ); ++ return 0; ++ } + - /* Check it's not too small */ - if (!dev_get_size(dev, &size)) { - log_debug("%s: Skipping: dev_get_size failed", name); + return 1; + } + ++++++ lvconvert-cluster-mirrored-disk-failed.patch ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,34 +1,47 @@ -Index: LVM2.2.02.98/daemons/clvmd/lvm-functions.c -=================================================================== ---- LVM2.2.02.98.orig/daemons/clvmd/lvm-functions.c -+++ LVM2.2.02.98/daemons/clvmd/lvm-functions.c -@@ -418,11 +418,13 @@ static int do_resume_lv(char *resource, - int oldmode, origin_only, exclusive, revert; +--- + daemons/clvmd/lvm-functions.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/daemons/clvmd/lvm-functions.c ++++ b/daemons/clvmd/lvm-functions.c +@@ -416,16 +416,18 @@ error: + /* Resume the LV if it was active */ + static int do_resume_lv(char *resource, unsigned char command, unsigned char lock_flags) + { +- int oldmode, origin_only, exclusive, revert; ++ int oldmode, origin_only, exclusive = 0, revert; ++#if 0 /* Is it open ? */ -+ /* oldmode = get_current_lock(resource); if (oldmode == -1 && (command & LCK_CLUSTER_VG)) { DEBUGLOG("do_resume_lv, lock not already held\n"); -- return 0; /* We don't need to do anything */ -+ return 0; + return 0; /* We don't need to do anything */ } -+ */ - origin_only = (lock_flags & LCK_ORIGIN_ONLY_MODE) ? 1 : 0; +- origin_only = (lock_flags & LCK_ORIGIN_ONLY_MODE) ? 1 : 0; exclusive = (oldmode == LCK_EXCL) ? 1 : 0; ++#endif ++ origin_only = (lock_flags & LCK_ORIGIN_ONLY_MODE) ? 1 : 0; revert = (lock_flags & LCK_REVERT_MODE) ? 1 : 0; -@@ -442,11 +444,13 @@ static int do_suspend_lv(char *resource, - unsigned exclusive; + if (!lv_resume_if_active(cmd, resource, origin_only, exclusive, revert, NULL)) +@@ -439,16 +441,17 @@ static int do_suspend_lv(char *resource, + { + int oldmode; + unsigned origin_only = (lock_flags & LCK_ORIGIN_ONLY_MODE) ? 1 : 0; +- unsigned exclusive; ++ unsigned exclusive = 0; + ++#if 0 /* Is it open ? */ -+ /* oldmode = get_current_lock(resource); if (oldmode == -1 && (command & LCK_CLUSTER_VG)) { DEBUGLOG("do_suspend_lv, lock not already held\n"); -- return 0; /* Not active, so it's OK */ -+ return 0; + return 0; /* Not active, so it's OK */ } -+ */ - +- exclusive = (oldmode == LCK_EXCL) ? 1 : 0; ++#endif + /* Always call lv_suspend to read commited and precommited data */ + if (!lv_suspend_if_active(cmd, resource, origin_only, exclusive, NULL, NULL)) ++++++ lvm.conf ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -72,7 +72,7 @@ # accepted. # By default we accept every block device except udev names, floppy and cdrom drives: - filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|","r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ] + filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|","r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ] # Exclude the cdrom drive # filter = [ "r|/dev/cdrom|" ] ++++++ make-mirror-legs-on-different-tag-pvs.patch ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -18,19 +18,18 @@ Signed-off-by: Guangliang Zhao <gz...@suse.com> --- - doc/example.conf.in | 17 +++++++++++++++++ - lib/config/defaults.h | 1 + - lib/metadata/lv_manip.c | 37 +++++++++++++++++++++++++++++++++++++ - man/lvcreate.8.in | 3 +++ - 4 files changed, 58 insertions(+) + conf/example.conf.in | 17 +++++++++++++++++ + lib/config/config_settings.h | 1 + + lib/config/defaults.h | 1 + + lib/metadata/lv_manip.c | 36 ++++++++++++++++++++++++++++++++++++ + man/lvcreate.8.in | 4 ++++ + 5 files changed, 59 insertions(+) -diff --git a/doc/example.conf.in b/doc/example.conf.in -index f7344bb..57e00d6 100644 ---- a/doc/example.conf.in -+++ b/doc/example.conf.in -@@ -224,6 +224,23 @@ allocation { - # algorithm. - maximise_cling = 1 +--- a/conf/example.conf.in ++++ b/conf/example.conf.in +@@ -315,6 +315,23 @@ allocation { + # + wipe_signatures_when_zeroing_new_lvs = 1 + # Set to 1 to guarantee that mirror leg will always be placed on + # different PVs(with different tags) from the other mirror legs. @@ -52,11 +51,19 @@ # Set to 1 to guarantee that mirror logs will always be placed on # different PVs from the mirror images. This was the default # until version 2.02.85. -diff --git a/lib/config/defaults.h b/lib/config/defaults.h -index 9730a2d..d08d004 100644 +--- a/lib/config/config_settings.h ++++ b/lib/config/config_settings.h +@@ -119,6 +119,7 @@ cfg(allocation_maximise_cling_CFG, "maxi + cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL) + cfg(allocation_wipe_signatures_when_zeroing_new_lvs_CFG, "wipe_signatures_when_zeroing_new_lvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL) + cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 85), NULL) ++cfg(allocation_mirror_legs_require_separate_pvs_CFG, "mirror_legs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LEGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 98), NULL) + cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL) + cfg_runtime(allocation_cache_pool_chunk_size_CFG, "cache_pool_chunk_size", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(2, 2, 106), NULL) + cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL) --- a/lib/config/defaults.h +++ b/lib/config/defaults.h -@@ -98,6 +98,7 @@ +@@ -125,6 +125,7 @@ #define DEFAULT_MAX_LV 0 #define DEFAULT_ALLOC_POLICY ALLOC_NORMAL #define DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS 0 @@ -64,11 +71,9 @@ #define DEFAULT_MAXIMISE_CLING 1 #define DEFAULT_CLUSTERED 0 -diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c -index 9f87854..fb0199f 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c -@@ -684,6 +684,9 @@ struct alloc_handle { +@@ -1409,6 +1409,9 @@ struct alloc_handle { unsigned maximise_cling; unsigned mirror_logs_separate; /* Force mirror logs on separate PVs? */ @@ -78,7 +83,7 @@ /* * RAID devices require a metadata area that accompanies each -@@ -868,6 +871,7 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd, +@@ -1598,6 +1601,7 @@ static struct alloc_handle *_alloc_init( ah->parity_count = parity_count; ah->region_size = region_size; ah->alloc = alloc; @@ -86,18 +91,17 @@ /* * For the purposes of allocation, area_count and parity_count are -@@ -879,6 +883,8 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd, +@@ -1609,6 +1613,7 @@ static struct alloc_handle *_alloc_init( ah->area_multiple = _calc_area_multiple(segtype, area_count + parity_count, stripes); - ah->mirror_logs_separate = find_config_tree_bool(cmd, "allocation/mirror_logs_require_separate_pvs", - DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS); -+ ah->mirror_legs_separate = find_config_tree_bool(cmd, "allocation/mirror_legs_require_separate_pvs", -+ DEFAULT_MIRROR_LEGS_REQUIRE_SEPARATE_PVS); - - if (segtype_is_raid(segtype)) { - if (metadata_area_count) { -@@ -1725,6 +1731,33 @@ static void _report_needed_allocation_space(struct alloc_handle *ah, - log_debug(" %" PRIu32 " %ss of %" PRIu32 " extents each", - metadata_count, metadata_type, metadata_size); + //FIXME: s/mirror_logs_separate/metadata_separate/ so it can be used by others? + ah->mirror_logs_separate = find_config_tree_bool(cmd, allocation_mirror_logs_require_separate_pvs_CFG, NULL); ++ ah->mirror_legs_separate = find_config_tree_bool(cmd, allocation_mirror_legs_require_separate_pvs_CFG, NULL); + + if (mirrors || stripes) + total_extents = new_extents; +@@ -2533,6 +2538,33 @@ static void _report_needed_allocation_sp + (metadata_count == 1) ? "" : "s", + metadata_size); } + +/* @@ -129,7 +133,7 @@ /* * Returns 1 regardless of whether any space was found, except on error. */ -@@ -1842,6 +1875,10 @@ static int _find_some_parallel_space(struct alloc_handle *ah, const struct alloc +@@ -2663,6 +2695,10 @@ static int _find_some_parallel_space(str continue; case USE_AREA: @@ -140,20 +144,16 @@ /* * Except with ALLOC_ANYWHERE, replace first area with this * one which is smaller but still big enough. -diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in -index f374950..d7355b9 100644 --- a/man/lvcreate.8.in +++ b/man/lvcreate.8.in -@@ -205,6 +205,9 @@ will create a persistent log that is itself mirrored. - - The optional argument --corelog is equivalent to --mirrorlog core. +@@ -284,6 +284,10 @@ will create a persistent log that is its + When the legacy "mirror" segment type is used, the optional argument + \fB\-\-corelog\fP is equivalent to \fB\-\-mirrorlog\fP \fIcore\fP. ++ +Every leg of the mirrored logical volume could be placed on the pvs with +same tag, see details(mirror_legs_require_separate_pvs) in lvm.conf. + .TP - .IR \fB\-n ", " \fB\-\-name " " LogicalVolume { Name | Path } - The name for the new logical volume. --- -1.7.10.4 - + .BR \-\-metadataprofile " " \fIProfileName + Uses and attaches the ProfileName configuration profile to the logical ++++++ no-inc-audit.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,22 +1,22 @@ -Index: lib/device/dev-io.c +Index: LVM2.2.02.111/lib/device/dev-io.c =================================================================== ---- lib/device/dev-io.c.orig 2009-05-20 19:09:49.000000000 +0800 -+++ lib/device/dev-io.c 2010-02-04 11:00:22.000000000 +0800 -@@ -31,6 +31,7 @@ +--- LVM2.2.02.111.orig/lib/device/dev-io.c ++++ LVM2.2.02.111/lib/device/dev-io.c +@@ -30,6 +30,7 @@ # define u64 uint64_t /* Missing without __KERNEL__ */ # undef WNOHANG /* Avoid redefinition */ # undef WUNTRACED /* Avoid redefinition */ -+# define _LINUX_AUDIT_H_ /* Avoid inclusion */ ++# define _LINUX_AUDIT_H_ /* Avoid inclusion */ # include <linux/fs.h> /* For block ioctl definitions */ # define BLKSIZE_SHIFT SECTOR_SHIFT # ifndef BLKGETSIZE64 /* fs.h out-of-date */ -Index: lib/filters/filter.c +Index: LVM2.2.02.111/lib/filters/filter-type.c =================================================================== ---- lib/filters/filter.c.orig 2010-02-04 11:00:18.000000000 +0800 -+++ lib/filters/filter.c 2010-02-04 11:00:22.000000000 +0800 -@@ -14,6 +14,7 @@ +--- LVM2.2.02.111.orig/lib/filters/filter-type.c ++++ LVM2.2.02.111/lib/filters/filter-type.c +@@ -13,6 +13,7 @@ + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #include <sys/ioctl.h> +#define _LINUX_AUDIT_H_ #include <linux/fs.h> ++++++ no_buildroot_shared.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,8 +1,8 @@ -Index: tools/Makefile.in +Index: LVM2.2.02.111/tools/Makefile.in =================================================================== ---- tools/Makefile.in.orig 2011-02-15 14:57:28.000000000 +0800 -+++ tools/Makefile.in 2011-02-15 14:57:32.000000000 +0800 -@@ -109,7 +109,7 @@ +--- LVM2.2.02.111.orig/tools/Makefile.in ++++ LVM2.2.02.111/tools/Makefile.in +@@ -110,7 +110,7 @@ LVMLIBS += -ldevmapper EXPORTED_HEADER = $(srcdir)/lvm2cmd.h EXPORTED_FN_PREFIX = lvm2 ++++++ pvmove_support_clustered_vg.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -9,7 +9,7 @@ } +/* 0 on not running, 1 on running */ -+static int check_cmirrord() ++static int check_cmirrord(void) +{ + int fd; + int ret = 0; ++++++ sys_mount_instead_linux_fs.diff ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,22 +1,22 @@ -Index: lib/device/dev-io.c +Index: LVM2.2.02.111/lib/device/dev-io.c =================================================================== ---- lib/device/dev-io.c.orig 2009-04-27 16:15:42.000000000 +0800 -+++ lib/device/dev-io.c 2009-04-27 16:15:49.000000000 +0800 -@@ -32,7 +32,7 @@ +--- LVM2.2.02.111.orig/lib/device/dev-io.c ++++ LVM2.2.02.111/lib/device/dev-io.c +@@ -31,7 +31,7 @@ # undef WNOHANG /* Avoid redefinition */ # undef WUNTRACED /* Avoid redefinition */ - # define _LINUX_AUDIT_H_ /* Avoid inclusion */ + # define _LINUX_AUDIT_H_ /* Avoid inclusion */ -# include <linux/fs.h> /* For block ioctl definitions */ -+# include <sys/mount.h> /* For block ioctl definitions */ ++# include <sys/mount.h> /* For block ioctl definitions */ # define BLKSIZE_SHIFT SECTOR_SHIFT # ifndef BLKGETSIZE64 /* fs.h out-of-date */ # define BLKGETSIZE64 _IOR(0x12, 114, size_t) -Index: lib/filters/filter.c +Index: LVM2.2.02.111/lib/filters/filter-type.c =================================================================== ---- lib/filters/filter.c.orig 2009-04-27 16:15:42.000000000 +0800 -+++ lib/filters/filter.c 2009-04-27 16:15:49.000000000 +0800 -@@ -15,7 +15,7 @@ - +--- LVM2.2.02.111.orig/lib/filters/filter-type.c ++++ LVM2.2.02.111/lib/filters/filter-type.c +@@ -14,7 +14,7 @@ + */ #include <sys/ioctl.h> #define _LINUX_AUDIT_H_ -#include <linux/fs.h> ++++++ udev-Check-for-DM_NR_VALID_PATHS.patch ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -18,45 +18,44 @@ udev/69-dm-lvm-metad.rules.in | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) -diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in -index 29af467..f108941 100644 ---- a/udev/10-dm.rules.in -+++ b/udev/10-dm.rules.in -@@ -111,7 +111,6 @@ ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/ +Index: LVM2.2.02.111/udev/10-dm.rules.in +=================================================================== +--- LVM2.2.02.111.orig/udev/10-dm.rules.in ++++ LVM2.2.02.111/udev/10-dm.rules.in +@@ -126,7 +126,6 @@ ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", # We have to ignore further rule application for inappropriate events # and devices. But still send the notification if cookie exists. -ENV{DM_UUID}=="mpath-?*", ENV{DM_ACTION}=="PATH_FAILED", GOTO="dm_disable" - ENV{DM_UUID}=="CRYPT-TEMP-?*", GOTO="dm_disable" - ENV{DM_UUID}!="?*", ENV{DM_NAME}=="temporary-cryptsetup-?*", GOTO="dm_disable" -diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in -index 1920260..d117a94 100644 ---- a/udev/13-dm-disk.rules.in -+++ b/udev/13-dm-disk.rules.in -@@ -18,8 +18,10 @@ SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" - ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" + # Avoid processing and scanning a DM device in the other (foreign) + # rules if it is in suspended state. However, we still keep 'disk' +Index: LVM2.2.02.111/udev/13-dm-disk.rules.in +=================================================================== +--- LVM2.2.02.111.orig/udev/13-dm-disk.rules.in ++++ LVM2.2.02.111/udev/13-dm-disk.rules.in +@@ -18,10 +18,12 @@ SYMLINK+="disk/by-id/dm-name-$env{DM_NAM + ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace" ENV{DM_SUSPENDED}=="1", GOTO="dm_end" +ENV{DM_NR_VALID_PATHS}=="0", GOTO="dm_blkid_end" + ENV{DM_NOSCAN}=="1", GOTO="dm_watch" + ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end" (BLKID_RULE) +LABEL="dm_blkid_end" - ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100" - ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" - ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" -diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in -index 706c03b..0b0ebbf 100644 ---- a/udev/69-dm-lvm-metad.rules.in -+++ b/udev/69-dm-lvm-metad.rules.in -@@ -19,6 +19,7 @@ SUBSYSTEM!="block", GOTO="lvm_end" + ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100" + OPTIONS+="watch" + ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" +Index: LVM2.2.02.111/udev/69-dm-lvm-metad.rules.in +=================================================================== +--- LVM2.2.02.111.orig/udev/69-dm-lvm-metad.rules.in ++++ LVM2.2.02.111/udev/69-dm-lvm-metad.rules.in +@@ -47,6 +47,7 @@ ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="dis - # Device-mapper devices are processed only on change event or on supported synthesized event. - KERNEL=="dm-[0-9]*", ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end" + # DM device: + KERNEL!="dm-[0-9]*", GOTO="next" +KERNEL=="dm-[0-9]*", ENV{DM_NR_VALID_PATHS}=="0", GOTO="lvm_end" + ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", ENV{DM_ACTIVATION}=="1", GOTO="lvm_scan" + GOTO="lvm_end" - # Only process devices already marked as a PV - this requires blkid to be called before. - ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", RUN+="(LVM_EXEC)/lvm pvscan --cache --activate ay --major $major --minor $minor" --- -1.8.4.5 - ++++++ udev_rules-update.diff ++++++ Index: LVM2.2.02.110/udev/10-dm.rules.in =================================================================== --- LVM2.2.02.110.orig/udev/10-dm.rules.in +++ LVM2.2.02.110/udev/10-dm.rules.in @@ -101,6 +101,10 @@ TEST=="dm", ENV{DM_NAME}="$attr{dm/name} TEST!="dm", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o name,uuid,suspended" ENV{DM_SUSPENDED}!="?*", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o suspended" +# dmsetup export is a SUSE extension to dmsetup +# it is required by some other udev rules in SUSE distro. +IMPORT{program}="(DM_EXEC)/dmsetup export -j %M -m %m" + # dmsetup tool provides suspended state information in textual # form with values "Suspended"/"Active". We translate it to # 0/1 respectively to be consistent with sysfs values. Index: LVM2.2.02.110/udev/13-dm-disk.rules.in =================================================================== --- LVM2.2.02.110.orig/udev/13-dm-disk.rules.in +++ LVM2.2.02.110/udev/13-dm-disk.rules.in @@ -14,14 +14,17 @@ ACTION!="add|change", GOTO="dm_end" ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end" ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end" -SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" -ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" +SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace" +ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace" ENV{DM_SUSPENDED}=="1", GOTO="dm_end" ENV{DM_NOSCAN}=="1", GOTO="dm_watch" +ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end" (BLKID_RULE) -ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100" +ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100" +OPTIONS+="watch" +ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" ++++++ use-mirrortype-asdefault-whenclvmdrunning.patch ++++++ --- /var/tmp/diff_new_pack.mgayqk/_old 2014-11-11 10:16:06.000000000 +0100 +++ /var/tmp/diff_new_pack.mgayqk/_new 2014-11-11 10:16:06.000000000 +0100 @@ -1,12 +1,14 @@ -Index: LVM2.2.02.98/tools/lvcreate.c -=================================================================== ---- LVM2.2.02.98.orig/tools/lvcreate.c 2014-04-14 14:25:22.291748711 +0800 -+++ LVM2.2.02.98/tools/lvcreate.c 2014-04-24 15:40:49.104019108 +0800 -@@ -670,6 +670,28 @@ static int _read_activation_params(struc +--- + tools/lvcreate.c | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +--- a/tools/lvcreate.c ++++ b/tools/lvcreate.c +@@ -834,6 +834,28 @@ static int _read_activation_params(struc return 1; } -+static int clvmd_daemon_is_running() ++static int clvmd_daemon_is_running(void) +{ + int fd; + struct flock lock; @@ -31,24 +33,22 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct lvcreate_cmdline_params *lcp, struct cmd_context *cmd, -@@ -696,15 +718,16 @@ static int _lvcreate_params(struct lvcre - } +@@ -860,14 +882,16 @@ static int _lvcreate_params(struct lvcre - // FIXME -m0 implies *striped* -- -- /* Set default segtype */ -- if (arg_count(cmd, mirrors_ARG)) -+ /* Set default segtype */ -+ if (arg_count(cmd, mirrors_ARG)) { - /* - * FIXME: Add default setting for when -i and -m arguments - * are both given. We should default to "raid10". - */ - segtype_str = find_config_tree_str(cmd, "global/mirror_segtype_default", DEFAULT_MIRROR_SEGTYPE); + /* Set default segtype - remember, '-m 0' implies stripe. */ + if (arg_count(cmd, mirrors_ARG) && +- arg_uint_value(cmd, mirrors_ARG, 0)) ++ arg_uint_value(cmd, mirrors_ARG, 0)) { + if (arg_uint_value(cmd, arg_count(cmd, stripes_long_ARG) ? + stripes_long_ARG : stripes_ARG, 1) > 1) { + segtype_str = find_config_tree_str(cmd, global_raid10_segtype_default_CFG, NULL);; + } else { + segtype_str = find_config_tree_str(cmd, global_mirror_segtype_default_CFG, NULL); + } - else if (arg_count(cmd, thin_ARG) || arg_count(cmd, thinpool_ARG)) + if(clvmd_daemon_is_running()) + segtype_str = "mirror"; + } else if (arg_count(cmd, thin_ARG) || arg_count(cmd, thinpool_ARG)) segtype_str = "thin"; - else - segtype_str = "striped"; + else if (arg_count(cmd, cache_ARG) || arg_count(cmd, cachepool_ARG)) + segtype_str = "cache"; ++++++ version-plugins-in-libdir ++++++ From: Jeff Mahoney <je...@suse.com> Subject: build: Install links in libdir with versions Plugins in $(libdir)/device-mapper should probably be versioned but when they're linked into $(libdir) directly, they must be versioned. Signed-off-by: Jeff Mahoney <je...@suse.com> --- make.tmpl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/make.tmpl.in +++ b/make.tmpl.in @@ -394,7 +394,7 @@ install_lib_shared: $(LIB_SHARED) # when the code is fixed links could be removed. install_dm_plugin: $(LIB_SHARED) $(INSTALL_PROGRAM) -D $< $(libdir)/device-mapper/$(<F) - $(LN_S) -f device-mapper/$(<F) $(libdir)/$(<F) + $(LN_S) -f device-mapper/$(<F) $(libdir)/$(<F).$(LIB_VERSION) install_lvm2_plugin: $(LIB_SHARED) $(INSTALL_PROGRAM) -D $< $(libdir)/lvm2/$(<F) -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org