xref: /dflybsd-src/contrib/lvm2/dist/include/pv_alloc.h (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino /*	$NetBSD: pv_alloc.h,v 1.1.1.1 2008/12/22 00:18:44 haad Exp $	*/
286d7f5d3SJohn Marino 
386d7f5d3SJohn Marino /*
486d7f5d3SJohn Marino  * Copyright (C) 2005 Red Hat, Inc. All rights reserved.
586d7f5d3SJohn Marino  *
686d7f5d3SJohn Marino  * This file is part of LVM2.
786d7f5d3SJohn Marino  *
886d7f5d3SJohn Marino  * This copyrighted material is made available to anyone wishing to use,
986d7f5d3SJohn Marino  * modify, copy, or redistribute it subject to the terms and conditions
1086d7f5d3SJohn Marino  * of the GNU Lesser General Public License v.2.1.
1186d7f5d3SJohn Marino  *
1286d7f5d3SJohn Marino  * You should have received a copy of the GNU Lesser General Public License
1386d7f5d3SJohn Marino  * along with this program; if not, write to the Free Software Foundation,
1486d7f5d3SJohn Marino  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
1586d7f5d3SJohn Marino  */
1686d7f5d3SJohn Marino 
1786d7f5d3SJohn Marino #ifndef _LVM_PV_ALLOC_H
1886d7f5d3SJohn Marino 
1986d7f5d3SJohn Marino int alloc_pv_segment_whole_pv(struct dm_pool *mem, struct physical_volume *pv);
2086d7f5d3SJohn Marino int peg_dup(struct dm_pool *mem, struct dm_list *peg_new, struct dm_list *peg_old);
2186d7f5d3SJohn Marino struct pv_segment *assign_peg_to_lvseg(struct physical_volume *pv, uint32_t pe,
2286d7f5d3SJohn Marino 				       uint32_t area_len,
2386d7f5d3SJohn Marino 				       struct lv_segment *seg,
2486d7f5d3SJohn Marino 				       uint32_t area_num);
2586d7f5d3SJohn Marino int pv_split_segment(struct physical_volume *pv, uint32_t pe);
2686d7f5d3SJohn Marino int release_pv_segment(struct pv_segment *peg, uint32_t area_reduction);
2786d7f5d3SJohn Marino int check_pv_segments(struct volume_group *vg);
2886d7f5d3SJohn Marino void merge_pv_segments(struct pv_segment *peg1, struct pv_segment *peg2);
2986d7f5d3SJohn Marino 
3086d7f5d3SJohn Marino #endif
31