From 2fb492f665f3dd818c6c7f921628a6dd3d0834a3 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 24 Nov 2005 18:46:51 +0000 Subject: [PATCH] Fix lv_empty. --- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 32e998ddd..d7904d8bb 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.02 ==================================== + Fix lv_empty. Version 2.02.01 - 23rd November 2005 ==================================== diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index dcf1f2627..b6be839c8 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -346,9 +346,12 @@ static int _lv_reduce(struct logical_volume *lv, uint32_t extents, int delete) */ int lv_empty(struct logical_volume *lv) { - return _lv_reduce(lv, 0, lv->le_count); + return _lv_reduce(lv, lv->le_count, 0); } +/* + * Remove given number of extents from LV + */ int lv_reduce(struct logical_volume *lv, uint32_t extents) { return _lv_reduce(lv, extents, 1); -- 2.43.5