[lvm-devel] [PATCH 29/30] Update segsize_disp to call liblvm 'get' function.
Dave Wysochanski
dwysocha at redhat.com
Mon May 11 13:01:42 UTC 2009
No functional change.
Signed-off-by: Dave Wysochanski <dwysocha at redhat.com>
---
lib/report/lvm_object_prop.c | 3 +--
lib/report/report.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/report/lvm_object_prop.c b/lib/report/lvm_object_prop.c
index dc80752..1bda95b 100644
--- a/lib/report/lvm_object_prop.c
+++ b/lib/report/lvm_object_prop.c
@@ -958,8 +958,7 @@ int lvm_lvseg_set_start_pe(lvseg_t *lvseg, const uint64_t value)
*/
uint64_t lvm_lvseg_get_size(const lvseg_t *lvseg)
{
- /* FIXME: implement function body */
- return 0;
+ return (uint64_t) lvseg->len * lvseg->lv->vg->extent_size;
}
int lvm_lvseg_set_size(lvseg_t *lvseg, const uint64_t value)
{
diff --git a/lib/report/report.c b/lib/report/report.c
index b59e6a1..e91cef2 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -758,7 +758,7 @@ static int _segsize_disp(struct dm_report *rh, struct dm_pool *mem,
const struct lv_segment *seg = (const struct lv_segment *) data;
uint64_t size;
- size = (uint64_t) seg->len * seg->lv->vg->extent_size;
+ size = lvm_lvseg_get_size(seg);
return _size64_disp(rh, mem, field, &size, private);
}
--
1.6.0.6
More information about the lvm-devel
mailing list