New version
- Merge pull request #62 from vpodzime/master-clean_up (vpodzime) - Use addCleanup() instead of tearDown() in tests (vpodzime) - Merge pull request #58 from vpodzime/master-lvm_dbus_pr (vpodzime) - Add the VG renaming functionality (vpodzime) - Packaging of the lvm-dbus plugin (vpodzime) - The LVM DBus plugin (vpodzime) - Add more generic functions for logging (vpodzime) - Use MAX(a, b) instead of CLAMP(b, a, b) (vpodzime) - Merge pull request #59 from vpodzime/master-vgrename (vpodzime) - Add a function for renaming VGs (vpodzime) - Merge pull request #57 from clumens/master (vpodzime) - Fix error reporting when running "make test". (clumens) - Merge pull request #54 from vojtechtrefny/master-pvsize (vpodzime) - Do not try to create a PV with 4KiB metadata space (vpodzime) - Add pv_info to BDLVMPVdata (vtrefny) - btrfs now requires at least 128MiB device(s) (vpodzime) - Merge pull request #52 from vpodzime/master (vpodzime)
This commit is contained in:
parent
d86c7e2429
commit
89a5e1b769
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@
|
||||
/libblockdev-1.1.tar.gz
|
||||
/libblockdev-1.2.tar.gz
|
||||
/libblockdev-1.3.tar.gz
|
||||
/libblockdev-1.4.tar.gz
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 5dea3ff0a5f9eb6fda3956192120bdb930307daf Mon Sep 17 00:00:00 2001
|
||||
From: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
Date: Wed, 4 Nov 2015 11:39:29 -0500
|
||||
Subject: [PATCH] Annotate the plugins_names out parameters as zero-terminated
|
||||
array
|
||||
|
||||
Otherwise GI gets confused about its type.
|
||||
|
||||
Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
---
|
||||
src/lib/blockdev.c.in | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lib/blockdev.c.in b/src/lib/blockdev.c.in
|
||||
index 01cea9b..eb6cf6c 100644
|
||||
--- a/src/lib/blockdev.c.in
|
||||
+++ b/src/lib/blockdev.c.in
|
||||
@@ -481,8 +481,8 @@ gboolean bd_ensure_init (BDPluginSpec **require_plugins, BDUtilsLogFunc log_func
|
||||
* for the plugin, the default is used) or %NULL to load all
|
||||
* plugins
|
||||
* @log_func: (allow-none) (scope notified): logging function to use
|
||||
- * @loaded_plugin_names: (allow-none) (out) (transfer container): names of the successfully
|
||||
- * loaded plugins
|
||||
+ * @loaded_plugin_names: (allow-none) (out) (transfer container) (array zero-terminated=1): names
|
||||
+ * of the successfully loaded plugins
|
||||
* @error: (out): place to store error (if any)
|
||||
*
|
||||
* Returns: whether the library was successfully initialized with all the
|
||||
--
|
||||
2.4.3
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 546d495b13553f9d20be0b421e1cc4a9087b4b08 Mon Sep 17 00:00:00 2001
|
||||
From: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
Date: Tue, 24 Nov 2015 13:03:43 +0100
|
||||
Subject: [PATCH] Create the cache pool before the to-be-cached LV
|
||||
|
||||
Cache pool typically has harder restrictions for PV space (where it should be
|
||||
allocated) than the LV.
|
||||
|
||||
Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
---
|
||||
src/plugins/lvm.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/lvm.c b/src/plugins/lvm.c
|
||||
index 30818c6..ead0d68 100644
|
||||
--- a/src/plugins/lvm.c
|
||||
+++ b/src/plugins/lvm.c
|
||||
@@ -1736,12 +1736,6 @@ gboolean bd_lvm_cache_create_cached_lv (gchar *vg_name, gchar *lv_name, guint64
|
||||
gboolean success = FALSE;
|
||||
gchar *name = NULL;
|
||||
|
||||
- success = bd_lvm_lvcreate (vg_name, lv_name, data_size, NULL, slow_pvs, error);
|
||||
- if (!success) {
|
||||
- g_prefix_error (error, "Failed to create the data LV: ");
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
name = g_strdup_printf ("%s_cache", lv_name);
|
||||
success = bd_lvm_cache_create_pool (vg_name, name, cache_size, md_size, mode, flags, fast_pvs, error);
|
||||
if (!success) {
|
||||
@@ -1750,6 +1744,12 @@ gboolean bd_lvm_cache_create_cached_lv (gchar *vg_name, gchar *lv_name, guint64
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ success = bd_lvm_lvcreate (vg_name, lv_name, data_size, NULL, slow_pvs, error);
|
||||
+ if (!success) {
|
||||
+ g_prefix_error (error, "Failed to create the data LV: ");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
success = bd_lvm_cache_attach (vg_name, lv_name, name, error);
|
||||
if (!success) {
|
||||
g_prefix_error (error, "Failed to attach the cache pool '%s' to the data LV: ", name);
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,15 +1,11 @@
|
||||
Name: libblockdev
|
||||
Version: 1.3
|
||||
Release: 6%{?dist}
|
||||
Version: 1.4
|
||||
Release: 1%{?dist}
|
||||
Summary: A library for low-level manipulation with block devices
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/rhinstaller/libblockdev
|
||||
Source0: https://github.com/rhinstaller/libblockdev/archive/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: blockdev_c_annotation_fix.patch
|
||||
Patch1: create_cache_pool_first.patch
|
||||
Patch2: thpoolcreate_round_size.patch
|
||||
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: gobject-introspection-devel
|
||||
BuildRequires: cryptsetup-devel
|
||||
@ -212,6 +208,25 @@ Requires: glib2-devel
|
||||
This package contains header files and pkg-config files needed for development
|
||||
with the libblockdev-lvm plugin/library.
|
||||
|
||||
%package lvm-dbus
|
||||
Summary: The LVM plugin for the libblockdev library
|
||||
Requires: %{name}-utils%{?_isa} >= 1.4
|
||||
# Requires: lvm2-dbus? (TBD)
|
||||
|
||||
%description lvm-dbus
|
||||
The libblockdev library plugin (and in the same time a standalone library)
|
||||
providing the LVM-related functionality utilizing the LVM DBus API.
|
||||
|
||||
%package lvm-dbus-devel
|
||||
Summary: Development files for the libblockdev-lvm-dbus plugin/library
|
||||
Requires: %{name}-lvm-dbus%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-utils-devel%{?_isa} >= 1.4
|
||||
Requires: glib2-devel
|
||||
|
||||
%description lvm-dbus-devel
|
||||
This package contains header files and pkg-config files needed for development
|
||||
with the libblockdev-lvm-dbus plugin/library.
|
||||
|
||||
|
||||
%package mdraid
|
||||
Summary: The MD RAID plugin for the libblockdev library
|
||||
@ -314,9 +329,6 @@ A meta-package that pulls all the libblockdev plugins as dependencies.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -341,6 +353,8 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
|
||||
%postun loop -p /sbin/ldconfig
|
||||
%post lvm -p /sbin/ldconfig
|
||||
%postun lvm -p /sbin/ldconfig
|
||||
%post lvm-dbus -p /sbin/ldconfig
|
||||
%postun lvm-dbus -p /sbin/ldconfig
|
||||
%post mdraid -p /sbin/ldconfig
|
||||
%postun mdraid -p /sbin/ldconfig
|
||||
%post mpath -p /sbin/ldconfig
|
||||
@ -441,6 +455,15 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
|
||||
%dir %{_includedir}/blockdev
|
||||
%{_includedir}/blockdev/lvm.h
|
||||
|
||||
%files lvm-dbus
|
||||
%{_libdir}/libbd_lvm-dbus.so.*
|
||||
%config %{_sysconfdir}/libblockdev/conf.d/10-lvm-dbus.cfg
|
||||
|
||||
%files lvm-dbus-devel
|
||||
%{_libdir}/libbd_lvm-dbus.so
|
||||
%dir %{_includedir}/blockdev
|
||||
%{_includedir}/blockdev/lvm.h
|
||||
|
||||
|
||||
%files mdraid
|
||||
%{_libdir}/libbd_mdraid.so.*
|
||||
@ -481,6 +504,25 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
|
||||
%files plugins-all
|
||||
|
||||
%changelog
|
||||
* Thu Feb 25 2016 Vratislav Podzimek <vpodzime@redhat.com> - 1.4-1
|
||||
- Merge pull request #62 from vpodzime/master-clean_up (vpodzime)
|
||||
- Use addCleanup() instead of tearDown() in tests (vpodzime)
|
||||
- Merge pull request #58 from vpodzime/master-lvm_dbus_pr (vpodzime)
|
||||
- Add the VG renaming functionality (vpodzime)
|
||||
- Packaging of the lvm-dbus plugin (vpodzime)
|
||||
- The LVM DBus plugin (vpodzime)
|
||||
- Add more generic functions for logging (vpodzime)
|
||||
- Use MAX(a, b) instead of CLAMP(b, a, b) (vpodzime)
|
||||
- Merge pull request #59 from vpodzime/master-vgrename (vpodzime)
|
||||
- Add a function for renaming VGs (vpodzime)
|
||||
- Merge pull request #57 from clumens/master (vpodzime)
|
||||
- Fix error reporting when running "make test". (clumens)
|
||||
- Merge pull request #54 from vojtechtrefny/master-pvsize (vpodzime)
|
||||
- Do not try to create a PV with 4KiB metadata space (vpodzime)
|
||||
- Add pv_info to BDLVMPVdata (vtrefny)
|
||||
- btrfs now requires at least 128MiB device(s) (vpodzime)
|
||||
- Merge pull request #52 from vpodzime/master (vpodzime)
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
18f4dad9ff47752e4da29a86b7dffc1b libblockdev-1.3.tar.gz
|
||||
1a1761eb0eab9b7c5b2623213bafadd7 libblockdev-1.4.tar.gz
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 45e63e5b107efb887a64c32c639f22b558c352d7 Mon Sep 17 00:00:00 2001
|
||||
From: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
Date: Mon, 4 Jan 2016 08:28:50 +0100
|
||||
Subject: [PATCH] Round size in thpoolcreate() to KiB
|
||||
|
||||
Otherwise LVM may complain about the size not being a multiple of 512. See
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1224638 for more details.
|
||||
|
||||
Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
|
||||
---
|
||||
src/plugins/lvm.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/lvm.c b/src/plugins/lvm.c
|
||||
index ead0d68..4f7e0e2 100644
|
||||
--- a/src/plugins/lvm.c
|
||||
+++ b/src/plugins/lvm.c
|
||||
@@ -1364,7 +1364,7 @@ gboolean bd_lvm_thpoolcreate (gchar *vg_name, gchar *lv_name, guint64 size, guin
|
||||
guint8 next_arg = 4;
|
||||
gboolean success = FALSE;
|
||||
|
||||
- args[3] = g_strdup_printf ("%"G_GUINT64_FORMAT"b", size);
|
||||
+ args[3] = g_strdup_printf ("%"G_GUINT64_FORMAT"K", size/1024);
|
||||
|
||||
if (md_size != 0) {
|
||||
args[next_arg] = g_strdup_printf("--poolmetadatasize=%"G_GUINT64_FORMAT"b", md_size);
|
||||
--
|
||||
2.5.0
|
||||
|
Loading…
Reference in New Issue
Block a user