Skip to content

Commit da71fbe

Browse files
committed
Remove the separate configure option for LVM cache support
We don't need any special dependency for LVM cache so it doesn't make sense to make the support optional.
1 parent 6991f77 commit da71fbe

File tree

4 files changed

+1
-47
lines changed

4 files changed

+1
-47
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ To build UDisks with (a) chosen module(s), provide or leave these
4747
configuration options for the `configure` script:
4848

4949
$ ./configure --enable-btrfs --enable-iscsi --enable-lsm
50-
--enable-lvm2 --enable-lvmcache
50+
--enable-lvm2
5151

5252
It is possible to enable all the modules at once:
5353

configure.ac

-18
Original file line numberDiff line numberDiff line change
@@ -310,23 +310,6 @@ if test "x$enable_lvm2" = "xyes" \
310310
fi
311311
AM_CONDITIONAL(HAVE_LVM2, [test "$have_lvm2" = "yes"])
312312

313-
# LVMCache
314-
have_lvmcache=no
315-
AC_ARG_ENABLE(lvmcache, AS_HELP_STRING([--enable-lvmcache], [enable LVMCache support]))
316-
if test "x$enable_lvmcache" = "xyes" \
317-
-o "x$enable_modules" = "xyes" \
318-
-o "x$enable_available_modules" = "xyes"; then
319-
320-
if test "x$have_lvm2" = "xno"; then
321-
if test "x$enable_lvmcache" = "xyes" -o "x$enable_modules" = "xyes"; then
322-
AC_MSG_ERROR([lvmcache support requested, but lvm2 module not enabled])
323-
fi
324-
fi
325-
have_lvmcache=yes
326-
AC_DEFINE(HAVE_LVMCACHE, 1, [Define if lvmcache is available])
327-
fi
328-
AM_CONDITIONAL(HAVE_LVMCACHE, [test "$have_lvmcache" = "yes"])
329-
330313
# iSCSI module
331314
have_iscsi=no
332315
have_libiscsi_session_info="no"
@@ -712,6 +695,5 @@ echo "
712695
BTRFS module: ${have_btrfs}
713696
iSCSI module: ${have_iscsi}${have_libiscsi_session_info_msg}
714697
LVM2 module: ${have_lvm2}
715-
LVMCache: ${have_lvmcache}
716698
LibStorageMgmt module: ${have_lsm}
717699
"

modules/lvm2/udiskslinuxlogicalvolume.c

-24
Original file line numberDiff line numberDiff line change
@@ -1088,16 +1088,6 @@ handle_cache_attach (UDisksLogicalVolume *volume_,
10881088
const gchar *cache_name,
10891089
GVariant *options)
10901090
{
1091-
#ifndef HAVE_LVMCACHE
1092-
1093-
g_dbus_method_invocation_return_error (invocation,
1094-
UDISKS_ERROR,
1095-
UDISKS_ERROR_FAILED,
1096-
N_("LVMCache not enabled at compile time."));
1097-
return TRUE;
1098-
1099-
#else
1100-
11011091
GError *error = NULL;
11021092
UDisksLinuxLogicalVolume *volume = UDISKS_LINUX_LOGICAL_VOLUME (volume_);
11031093
UDisksLinuxLogicalVolumeObject *object = NULL;
@@ -1140,8 +1130,6 @@ handle_cache_attach (UDisksLogicalVolume *volume_,
11401130
g_clear_object (&object);
11411131

11421132
return TRUE;
1143-
1144-
#endif /* HAVE_LVMCACHE */
11451133
}
11461134

11471135

@@ -1151,16 +1139,6 @@ handle_cache_detach_or_split (UDisksLogicalVolume *volume_,
11511139
GVariant *options,
11521140
gboolean destroy)
11531141
{
1154-
#ifndef HAVE_LVMCACHE
1155-
1156-
g_dbus_method_invocation_return_error (invocation,
1157-
UDISKS_ERROR,
1158-
UDISKS_ERROR_FAILED,
1159-
N_("LVMCache not enabled at compile time."));
1160-
return TRUE;
1161-
1162-
#else
1163-
11641142
GError *error = NULL;
11651143
UDisksLinuxLogicalVolume *volume = UDISKS_LINUX_LOGICAL_VOLUME (volume_);
11661144
UDisksLinuxLogicalVolumeObject *object = NULL;
@@ -1203,8 +1181,6 @@ handle_cache_detach_or_split (UDisksLogicalVolume *volume_,
12031181
g_clear_object (&object);
12041182

12051183
return TRUE;
1206-
1207-
#endif /* HAVE_LVMCACHE */
12081184
}
12091185

12101186
static gboolean

packaging/udisks2.spec

-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
%define with_btrfs 1
1111
%define with_lsm 1
12-
%define with_lvmcache 1
1312

1413
%define is_fedora 0%{?rhel} == 0
1514
%define is_git %(git show > /dev/null 2>&1 && echo 1 || echo 0)
@@ -208,9 +207,6 @@ autoreconf -ivf
208207
%endif
209208
%if 0%{?with_lsm}
210209
--enable-lsm \
211-
%endif
212-
%if 0%{?with_lvmcache}
213-
--enable-lvmcache \
214210
%endif
215211
--enable-lvm2 \
216212
--enable-iscsi

0 commit comments

Comments
 (0)