[lvm-devel] [PATCH 27/30] Update chunksize_disp to call liblvm 'get' function.
Dave Wysochanski
dwysocha at redhat.com
Mon May 11 13:01:40 UTC 2009
Should be no functional change.
Signed-off-by: Dave Wysochanski <dwysocha at redhat.com>
---
lib/report/lvm_object_prop.c | 8 ++++++--
lib/report/report.c | 5 +----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/report/lvm_object_prop.c b/lib/report/lvm_object_prop.c
index 63b742f..6a35122 100644
--- a/lib/report/lvm_object_prop.c
+++ b/lib/report/lvm_object_prop.c
@@ -914,8 +914,12 @@ int lvm_lvseg_set_region_size(lvseg_t *lvseg, const uint64_t value)
*/
uint64_t lvm_lvseg_get_chunk_size(const lvseg_t *lvseg)
{
- /* FIXME: implement function body */
- return 0;
+ uint64_t size;
+ if (lv_is_cow(lvseg->lv))
+ size = (uint64_t) find_cow(lvseg->lv)->chunk_size;
+ else
+ size = UINT64_C(0);
+ return size;
}
int lvm_lvseg_set_chunk_size(lvseg_t *lvseg, const uint64_t value)
{
diff --git a/lib/report/report.c b/lib/report/report.c
index e74dd1a..ece83df 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -803,10 +803,7 @@ static int _chunksize_disp(struct dm_report *rh, struct dm_pool *mem,
const struct lv_segment *seg = (const struct lv_segment *) data;
uint64_t size;
- if (lv_is_cow(seg->lv))
- size = (uint64_t) find_cow(seg->lv)->chunk_size;
- else
- size = UINT64_C(0);
+ size = lvm_lvseg_get_chunk_size(seg);
return _size64_disp(rh, mem, field, &size, private);
}
--
1.6.0.6
More information about the lvm-devel
mailing list