1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-20 11:33:15 +03:00

Compare commits

..

9 Commits

Author SHA1 Message Date
Marian Csontos
b3000598ce spec: Disable sanlock only, keep lockd_dlm enabled 2016-09-16 18:01:31 +02:00
Marian Csontos
de68e837b4 spec: Replace remaining %define by %global 2016-09-16 17:31:37 +02:00
Marian Csontos
ddec56ec3a spec: Use %global instead of %define for constants
Using %define is now discouraged by Fedora Packaging Guidelines
2016-09-16 17:31:37 +02:00
Marian Csontos
b6c3af9b6f spec: Update requirements for lockd
lockd requires sanlock >= 3.3.0
2016-09-16 17:31:37 +02:00
Marian Csontos
9c68431c5d spec: Profiles are not %confi(noreplace)
These files are just examles and should not be edited by user.
2016-09-16 17:31:36 +02:00
Bryn M. Reeves
c26cd48536 libdm: fix end-of-groups test in _stats_walk_end() 2016-09-16 13:09:22 +01:00
Alasdair G Kergon
9c8c8fb63a alloc: Use --alloc normal for mirror logs.
The existing code doesn't understand that mirror logs should cling to
parallel LVs (like extending them) instead of avoiding them.

As a quick workaround to avoid lvcreate failures, hard-code
--alloc normal for mirror logs even if the rest of the allocation
used a stricter policy.

https://bugzilla.redhat.com/show_bug.cgi?id=1376532
2016-09-16 02:11:58 +01:00
Alasdair G Kergon
5da35d879a lvmdump: Use O_DIRECT to gather metadata. 2016-09-15 14:00:39 +01:00
David Teigland
d455300d7b lvmlockd: fix metadata validation when rescanning VG
When rescanning a VG from disk, the metadata read from
each PV was compared as a sanity check.  The comparison
is done by exporting the vg metadata from each dev to
a config tree, and then comparing the config trees.
The function to create the config tree inserts
extraneous information along with the actual VG metadata.
This extra info includes creation_time.  The config
trees for two devs can easily be created one second
apart in which case the different creation_times would
cause the metadata comparison to fail.  The fix is to
exclude the extraneous info from the metadata comparison.
2016-09-14 10:43:33 -05:00
12 changed files with 128 additions and 77 deletions

View File

@@ -1,5 +1,7 @@
Version 2.02.166 -
=====================================
Use --alloc normal for mirror logs even if the mimages were stricter.
Use O_DIRECT to gather metadata in lvmdump.
Fix possible NULL pointer derefence when checking for monitoring.
Add lvmreport(7) man page.
Don't install lvmraid(7) man page when raid excluded. (2.02.165)

5
configure vendored
View File

@@ -676,6 +676,7 @@ PTHREAD_LIBS
M_LIBS
POOL
PKGCONFIG
ODIRECT
OCFDIR
OCF
MIRRORS
@@ -15339,10 +15340,11 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile include/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile include/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -16109,6 +16111,7 @@ do
"scripts/lvm2_monitoring_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_monitoring_systemd_red_hat.service" ;;
"scripts/lvm2_pvscan_systemd_red_hat@.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_pvscan_systemd_red_hat@.service" ;;
"scripts/lvm2_tmpfiles_red_hat.conf") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_tmpfiles_red_hat.conf" ;;
"scripts/lvmdump.sh") CONFIG_FILES="$CONFIG_FILES scripts/lvmdump.sh" ;;
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
"test/api/Makefile") CONFIG_FILES="$CONFIG_FILES test/api/Makefile" ;;

View File

@@ -2068,6 +2068,7 @@ AC_SUBST(MIRRORS)
AC_SUBST(MSGFMT)
AC_SUBST(OCF)
AC_SUBST(OCFDIR)
AC_SUBST(ODIRECT)
AC_SUBST(PKGCONFIG)
AC_SUBST(POOL)
AC_SUBST(M_LIBS)
@@ -2213,6 +2214,7 @@ scripts/lvm2_monitoring_init_red_hat
scripts/lvm2_monitoring_systemd_red_hat.service
scripts/lvm2_pvscan_systemd_red_hat@.service
scripts/lvm2_tmpfiles_red_hat.conf
scripts/lvmdump.sh
scripts/Makefile
test/Makefile
test/api/Makefile

31
lib/cache/lvmetad.c vendored
View File

@@ -1918,15 +1918,44 @@ scan_more:
vgmeta_ret = vgmeta;
save_dev = devl->dev;
} else {
if (compare_config(vgmeta_ret->root, vgmeta->root)) {
struct dm_config_node *meta1 = vgmeta_ret->root;
struct dm_config_node *meta2 = vgmeta->root;
struct dm_config_node *sib1 = meta1->sib;
struct dm_config_node *sib2 = meta2->sib;
/*
* Do not compare the extraneous data that
* export_vg_to_config_tree() inserts next to the
* actual VG metadata. This includes creation_time
* which may not match since it is generated separately
* for each call to create the config tree.
*
* We're saving the sibling pointer and restoring it
* after the compare because we're unsure if anything
* later might want it.
*
* FIXME: make it clearer what we're doing here, e.g.
* pass a parameter to export_vg_to_config_tree()
* telling it to skip the extraneous data, or something.
* It's very non-obvious that setting sib=NULL does that.
*/
meta1->sib = NULL;
meta2->sib = NULL;
if (compare_config(meta1, meta2)) {
log_error("VG %s metadata comparison failed for device %s vs %s",
vg->name, dev_name(devl->dev), save_dev ? dev_name(save_dev) : "none");
_log_debug_inequality(vg->name, vgmeta_ret->root, vgmeta->root);
meta1->sib = sib1;
meta2->sib = sib2;
dm_config_destroy(vgmeta);
dm_config_destroy(vgmeta_ret);
release_vg(baton.vg);
return NULL;
}
meta1->sib = sib1;
meta2->sib = sib2;
dm_config_destroy(vgmeta);
}

View File

@@ -3085,6 +3085,15 @@ static int _allocate(struct alloc_handle *ah,
if (!_find_max_parallel_space_for_one_policy(ah, &alloc_parms, pvms, &alloc_state))
goto_out;
/* As a workaround, if only the log is missing now, fall through and try later policies up to normal. */
/* FIXME Change the core algorithm so the log extents cling to parallel LVs instead of avoiding them. */
if (alloc_state.allocated == ah->new_extents &&
alloc_state.log_area_count_still_needed &&
ah->alloc < ALLOC_NORMAL) {
ah->alloc = ALLOC_NORMAL;
continue;
}
if ((alloc_state.allocated == ah->new_extents &&
!alloc_state.log_area_count_still_needed) ||
(!can_split && (alloc_state.allocated != old_allocated)))

View File

@@ -1543,7 +1543,7 @@ static int _stats_walk_end(const struct dm_stats *dms, uint64_t *flags,
}
if (*flags & DM_STATS_WALK_GROUP) {
if (*cur_g < dms->max_region)
if (*cur_g <= dms->max_region)
goto out;
*flags &= ~DM_STATS_WALK_GROUP;
}

8
scripts/lvmdump.sh → scripts/lvmdump.sh.in Executable file → Normal file
View File

@@ -37,6 +37,12 @@ TR=tr
SOCAT=socat # either socat or nc is needed for dumping lvmetad state
NC=nc
if test "@ODIRECT@" = yes; then
DDFLAGS='iflag=direct oflag=direct'
else
DDFLAGS=
fi
# user may override lvm and dmsetup location by setting LVM_BINARY
# and DMSETUP_BINARY respectively
LVM=${LVM_BINARY-lvm}
@@ -241,7 +247,7 @@ if (( $metadata )); then
pe_start="$(echo $line | $CUT -d, -f2)"
name="$($BASENAME "$pv")"
myecho " $pv"
log "$DD if=$pv \"of=$dir/metadata/$name\" bs=512 count=$pe_start 2>> \"$log\""
log "$DD if=$pv \"of=$dir/metadata/$name\" $DDFLAGS bs=512 count=$pe_start 2>> \"$log\""
done
fi

View File

@@ -14,7 +14,7 @@
# on those systems.
# A macro to pull in an include file from an appropriate location.
%define import() %include %(test -e %{S:%1} && echo %{S:%1} || echo %{_sourcedir}/%1)
%global import() %%include %%(test -e %%{S:%%1} && echo %%{S:%%1} || echo %%{_sourcedir}/%%1)
%import source.inc

View File

@@ -14,70 +14,70 @@
%global rhel 0
%endif
%define enableif() \
%global configure_flags %{?configure_flags} --%(if test %1 -gt 0; then echo enable-%2; else echo disable-%2; fi)
%global enableif() \
%%global configure_flags %%{?configure_flags} --%%(if test %%1 -gt 0; then echo enable-%%2; else echo disable-%%2; fi)
%define with() \
%global configure_flags %(echo -n "%{?configure_flags} " | sed -e "s,--with-%1=[^ ]*,,"; test -n "%{?2}" && echo --with-%1=%2) \
%global with_flags %(echo -n "%{?with_flags} " | sed -e "s,%1,,"; test -n "%{?2}" && test "%{?2}" != none && echo %1)
%global with() \
%%global configure_flags %%(echo -n "%%{?configure_flags} " | sed -e "s,--with-%%1=[^ ]*,,"; test -n "%%{?2}" && echo --with-%%1=%%2) \
%%global with_flags %%(echo -n "%%{?with_flags} " | sed -e "s,%%1,,"; test -n "%%{?2}" && test "%%{?2}" != none && echo %%1)
%global services monitor
%define service() \
%global services %(echo -n "%{?services} " | sed -e s,%1,,; test "%2" = 1 && echo %1)
%global service() \
%%global services %%(echo -n "%%{?services} " | sed -e s,%%1,,; test "%%2" = 1 && echo %%1)
%define maybe() \
%if %(test -n "%{?2}" && echo 1 || echo 0) \
%* \
%endif
%global maybe() \
%%if %%(test -n "%%{?2}" && echo 1 || echo 0) \
%%* \
%%endif
%define have_with() %(if echo %{with_flags} | grep -q %1; then echo 1; else echo 0; fi)
%define have_service() %(if echo %{services} | grep -q %1; then echo 1; else echo 0; fi)
%global have_with() %%(if echo %%{with_flags} | grep -q %%1; then echo 1; else echo 0; fi)
%global have_service() %%(if echo %%{services} | grep -q %%1; then echo 1; else echo 0; fi)
%define daemon_reload \
%if %{enable_systemd} \
%global daemon_reload \
%%if %%{enable_systemd} \
systemctl daemon-reload > /dev/null 2>&1 || : \
%endif \
%%endif \
: \
%{nil}
%%{nil}
%define enable(s:t:) \
%if %{have_service %{-s*}} \
%if %{enable_systemd} \
%global enable(s:t:) \
%%if %%{have_service %%{-s*}} \
%%if %%{enable_systemd} \
if [ $1 = 1 ]; then \
systemctl preset lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
systemctl preset lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
fi \
%else \
/sbin/chkconfig --add lvm2-%{-s*} \
%endif \
%endif \
%%else \
/sbin/chkconfig --add lvm2-%%{-s*} \
%%endif \
%%endif \
: \
%{nil}
%%{nil}
%define disable(s:t:) \
%if %{have_service %{-s*}} \
%if %{enable_systemd} \
%global disable(s:t:) \
%%if %%{have_service %%{-s*}} \
%%if %%{enable_systemd} \
if [ $1 = 0 ]; then \
systemctl --no-reload disable lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
%if %{-t*} == socket \
systemctl --no-reload disable lvm2-%{-s*}.service > /dev/null 2>&1 || : \
%endif \
systemctl stop lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
%if %{-t*} == socket \
systemctl stop lvm2-%{-s*}.service > /dev/null 2>&1 || : \
%endif \
systemctl --no-reload disable lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
%%if %%{-t*} == socket \
systemctl --no-reload disable lvm2-%%{-s*}.service > /dev/null 2>&1 || : \
%%endif \
systemctl stop lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
%%if %%{-t*} == socket \
systemctl stop lvm2-%%{-s*}.service > /dev/null 2>&1 || : \
%%endif \
fi \
%else \
/sbin/chkconfig --del lvm2-%{-s*} \
%endif \
%endif \
%%else \
/sbin/chkconfig --del lvm2-%%{-s*} \
%%endif \
%%endif \
: \
%{nil}
%%{nil}
%define try_restart(s:t:) \
%if %{have_service %{-s*}} && %{enable_systemd} \
%global try_restart(s:t:) \
%%if %%{have_service %%{-s*}} && %%{enable_systemd} \
if [ $1 = 1 ]; then \
systemctl try-restart lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
systemctl try-restart lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
fi \
%endif \
%%endif \
: \
%{nil}
%%{nil}

View File

@@ -176,13 +176,13 @@ fi
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf
%dir %{_sysconfdir}/lvm/profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-mq.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-smq.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/lvmdbusd.profile
%{_sysconfdir}/lvm/profile/command_profile_template.profile
%{_sysconfdir}/lvm/profile/metadata_profile_template.profile
%{_sysconfdir}/lvm/profile/thin-generic.profile
%{_sysconfdir}/lvm/profile/thin-performance.profile
%{_sysconfdir}/lvm/profile/cache-mq.profile
%{_sysconfdir}/lvm/profile/cache-smq.profile
%{_sysconfdir}/lvm/profile/lvmdbusd.profile
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/cache
%dir %{_sysconfdir}/lvm/archive

View File

@@ -48,23 +48,28 @@
%global req_udev udev >= 181-1
%if %{fedora} >= 22 || %{rhel} >= 7
%if %{fedora} >= 24 || %{rhel} >= 7
%service lvmlockd 1
%define sanlock_version 3.2.4-1
%define enable_lockd_dlm 1
%define enable_lockd_sanlock 1
%global sanlock_version 3.3.0-1
%global enable_lockd_dlm 1
%global enable_lockd_sanlock 1
%if %{rhel}
%ifarch i686 x86_64 s390x
%global buildreq_lockd_dlm dlm-devel >= %{dlm_version}
%else
%define enable_lockd_dlm 0
%global enable_lockd_dlm 0
%endif
%ifarch x86_64 ppc64le ppc64 aarch64
%global buildreq_lockd_sanlock sanlock-devel >= %{sanlock_version}
%else
%define enable_lockd_sanlock 0
%global enable_lockd_sanlock 0
%endif
%endif
%else
%if %{fedora} >= 22
%service lvmlockd 1
%global enable_lockd_dlm 1
%endif
%endif
##############################################################
@@ -140,7 +145,7 @@
# same as FC 16 above, only with older udev
%if %{rhel} == 6
%define req_udev udev >= 147-2
%global req_udev udev >= 147-2
%global req_dm_persistent device-mapper-persistent-data >= 0.1.4
%endif
@@ -149,7 +154,7 @@
# Do not reset Release to 1 unless both lvm2 and device-mapper
# versions are increased together.
%define device_mapper_version 1.02.97
%global device_mapper_version 1.02.97
Summary: Userland logical volume management tools
Name: lvm2

View File

@@ -4951,12 +4951,12 @@ static char *_get_abspath(const char *path)
static int _stats_create_file(CMD_ARGS)
{
const char *alias, *program_id = DM_STATS_PROGRAM_ID;
const char *bounds_str = _string_args[BOUNDS_ARG];
const char *histogram = _string_args[BOUNDS_ARG];
uint64_t *regions, *region, count = 0;
struct dm_histogram *bounds = NULL;
char *path, *abspath = NULL;
struct dm_stats *dms = NULL;
int group, fd, precise;
struct dm_stats *dms;
if (_switches[AREAS_ARG] || _switches[AREA_SIZE_ARG]) {
log_error("--filemap is incompatible with --areas and --area-size.");
@@ -5017,8 +5017,7 @@ static int _stats_create_file(CMD_ARGS)
return 0;
}
if (bounds_str
&& !(bounds = dm_histogram_bounds_from_string(bounds_str))) {
if (histogram && !(bounds = dm_histogram_bounds_from_string(histogram))) {
dm_free(abspath);
return_0;
}
@@ -5032,7 +5031,7 @@ static int _stats_create_file(CMD_ARGS)
group = !_switches[NOGROUP_ARG];
if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID)))
goto_bad;
return_0;
fd = open(abspath, O_RDONLY);
@@ -5088,20 +5087,16 @@ static int _stats_create_file(CMD_ARGS)
dm_free(regions);
dm_free(abspath);
dm_free(bounds);
dm_stats_destroy(dms);
return 1;
bad:
dm_free(abspath);
dm_free(bounds);
if ((fd > -1) && close(fd))
log_error("Error closing %s", path);
if (dms)
dm_stats_destroy(dms);
dm_stats_destroy(dms);
return 0;
}