[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [LVM2 PATCH] (3/5) Remove unused parameters from _allocate()

This patch removes unused 'stripes', 'mirrors', 'status' and
'segtype' parameters from _allocate() in lib/metadata/lv_manip.c.

'stripes' and 'mirrors' can be found in struct alloc_handle.
'status' and 'segtype' aren't there but if future code requires them,
they can be embedded in struct alloc_handle, too.

Jun'ichi Nomura, NEC Corporation of America
Removing unused parameters from _allocate() in lib/metadata/lv_manip.c.
  * Removed unused 'stripes' and 'mirrors'.
    They are already set in alloc_handle in _alloc_init().
  * Removed unused 'segtype' and 'status'.
    Currently unused. If the information is necessary, it can be
    embedded in alloc_handle.

Index: LVM2.work/lib/metadata/lv_manip.c
--- LVM2.work.orig/lib/metadata/lv_manip.c
+++ LVM2.work/lib/metadata/lv_manip.c
@@ -1076,11 +1076,9 @@ static int _find_parallel_space(struct a
 static int _allocate(struct alloc_handle *ah,
 		     struct volume_group *vg,
-		     struct logical_volume *lv, uint32_t status,
+		     struct logical_volume *lv,
 		     uint32_t new_extents,
-		     struct list *allocatable_pvs,
-		     uint32_t stripes, uint32_t mirrors,
-		     const struct segment_type *segtype)
+		     struct list *allocatable_pvs)
 	struct pv_area **areas;
 	uint32_t allocated = lv ? lv->le_count : 0;
@@ -1238,8 +1236,8 @@ struct alloc_handle *allocate_extents(st
 	if (!segtype_is_virtual(segtype) &&
-	    !_allocate(ah, vg, lv, status, (lv ? lv->le_count : 0) + extents,
-		       allocatable_pvs, stripes, mirrors, segtype)) {
+	    !_allocate(ah, vg, lv, (lv ? lv->le_count : 0) + extents,
+		       allocatable_pvs)) {
 		return NULL;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]