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

[lvm-devel] [PATCH mirror 4/13] Add 'const' for some mirror related functions



This patch adds 'const' to some functions used in mirroring code.
No functional change.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America

Index: LVM2.work/lib/metadata/metadata-exported.h
===================================================================
--- LVM2.work.orig/lib/metadata/metadata-exported.h
+++ LVM2.work/lib/metadata/metadata-exported.h
@@ -391,7 +391,7 @@ struct physical_volume *find_pv_by_name(
 					const char *pv_name);
 
 /* Find LV segment containing given LE */
-struct lv_segment *first_seg(struct logical_volume *lv);
+struct lv_segment *first_seg(const struct logical_volume *lv);
 
 
 /*
Index: LVM2.work/lib/metadata/metadata.c
===================================================================
--- LVM2.work.orig/lib/metadata/metadata.c
+++ LVM2.work/lib/metadata/metadata.c
@@ -937,7 +937,7 @@ static struct physical_volume *_find_pv_
 }
 
 /* Find segment at a given logical extent in an LV */
-struct lv_segment *find_seg_by_le(struct logical_volume *lv, uint32_t le)
+struct lv_segment *find_seg_by_le(const struct logical_volume *lv, uint32_t le)
 {
 	struct lv_segment *seg;
 
@@ -948,7 +948,7 @@ struct lv_segment *find_seg_by_le(struct
 	return NULL;
 }
 
-struct lv_segment *first_seg(struct logical_volume *lv)
+struct lv_segment *first_seg(const struct logical_volume *lv)
 {
 	struct lv_segment *seg = NULL;
 
@@ -959,7 +959,7 @@ struct lv_segment *first_seg(struct logi
 }
 
 /* Find segment at a given physical extent in a PV */
-struct pv_segment *find_peg_by_pe(struct physical_volume *pv, uint32_t pe)
+struct pv_segment *find_peg_by_pe(const struct physical_volume *pv, uint32_t pe)
 {
 	struct pv_segment *peg;
 
Index: LVM2.work/lib/metadata/metadata.h
===================================================================
--- LVM2.work.orig/lib/metadata/metadata.h
+++ LVM2.work/lib/metadata/metadata.h
@@ -264,10 +264,10 @@ struct logical_volume *lv_from_lvid(stru
 struct physical_volume *find_pv(struct volume_group *vg, struct device *dev);
 
 /* Find LV segment containing given LE */
-struct lv_segment *find_seg_by_le(struct logical_volume *lv, uint32_t le);
+struct lv_segment *find_seg_by_le(const struct logical_volume *lv, uint32_t le);
 
 /* Find PV segment containing given LE */
-struct pv_segment *find_peg_by_pe(struct physical_volume *pv, uint32_t pe);
+struct pv_segment *find_peg_by_pe(const struct physical_volume *pv, uint32_t pe);
 
 /*
  * Remove a dev_dir if present.

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