[dm-devel] [PATCH 5 of 10] LVM: remove unused parameter
Jonathan Brassow
jbrassow at redhat.com
Thu Oct 8 21:19:07 UTC 2009
Patch name: lvm-remove-unused-parameter.patch
Here we get rid of completely unused parameters. No-one
uses them and they are confusing. (They imply a certain
level of processing is down by the time these functions
are called, which is not the case.) If they were just
extra params, I wouldn't bother, but they add to confusion.
RFC: Jonathan Brassow <jbrassow at redhat.com>
Index: LVM2/lib/metadata/lv_manip.c
===================================================================
--- LVM2.orig/lib/metadata/lv_manip.c
+++ LVM2/lib/metadata/lv_manip.c
@@ -645,8 +645,7 @@ static int _setup_alloced_segment(struct
uint32_t stripe_size,
const struct segment_type *segtype,
struct alloced_area *aa,
- uint32_t region_size,
- struct logical_volume *log_lv __attribute((unused)))
+ uint32_t region_size)
{
uint32_t s, extents, area_multiple;
struct lv_segment *seg;
@@ -686,15 +685,14 @@ static int _setup_alloced_segments(struc
uint32_t status,
uint32_t stripe_size,
const struct segment_type *segtype,
- uint32_t region_size,
- struct logical_volume *log_lv)
+ uint32_t region_size)
{
struct alloced_area *aa;
dm_list_iterate_items(aa, &alloced_areas[0]) {
if (!_setup_alloced_segment(lv, status, area_count,
stripe_size, segtype, aa,
- region_size, log_lv))
+ region_size))
return_0;
}
@@ -1401,7 +1399,7 @@ int lv_add_segment(struct alloc_handle *
if (!_setup_alloced_segments(lv, &ah->alloced_areas[first_area],
num_areas, status,
stripe_size, segtype,
- region_size, log_lv))
+ region_size))
return_0;
if ((segtype->flags & SEG_CAN_SPLIT) && !lv_merge_segments(lv)) {
More information about the dm-devel
mailing list