xref: /netbsd-src/external/gpl2/lvm2/dist/include/pv_alloc.h (revision 56a34939419542e88b386b2229be7565f4f45461)
1*56a34939Shaad /*	$NetBSD: pv_alloc.h,v 1.1.1.1 2008/12/22 00:18:44 haad Exp $	*/
2*56a34939Shaad 
3*56a34939Shaad /*
4*56a34939Shaad  * Copyright (C) 2005 Red Hat, Inc. All rights reserved.
5*56a34939Shaad  *
6*56a34939Shaad  * This file is part of LVM2.
7*56a34939Shaad  *
8*56a34939Shaad  * This copyrighted material is made available to anyone wishing to use,
9*56a34939Shaad  * modify, copy, or redistribute it subject to the terms and conditions
10*56a34939Shaad  * of the GNU Lesser General Public License v.2.1.
11*56a34939Shaad  *
12*56a34939Shaad  * You should have received a copy of the GNU Lesser General Public License
13*56a34939Shaad  * along with this program; if not, write to the Free Software Foundation,
14*56a34939Shaad  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
15*56a34939Shaad  */
16*56a34939Shaad 
17*56a34939Shaad #ifndef _LVM_PV_ALLOC_H
18*56a34939Shaad 
19*56a34939Shaad int alloc_pv_segment_whole_pv(struct dm_pool *mem, struct physical_volume *pv);
20*56a34939Shaad int peg_dup(struct dm_pool *mem, struct dm_list *peg_new, struct dm_list *peg_old);
21*56a34939Shaad struct pv_segment *assign_peg_to_lvseg(struct physical_volume *pv, uint32_t pe,
22*56a34939Shaad 				       uint32_t area_len,
23*56a34939Shaad 				       struct lv_segment *seg,
24*56a34939Shaad 				       uint32_t area_num);
25*56a34939Shaad int pv_split_segment(struct physical_volume *pv, uint32_t pe);
26*56a34939Shaad int release_pv_segment(struct pv_segment *peg, uint32_t area_reduction);
27*56a34939Shaad int check_pv_segments(struct volume_group *vg);
28*56a34939Shaad void merge_pv_segments(struct pv_segment *peg1, struct pv_segment *peg2);
29*56a34939Shaad 
30*56a34939Shaad #endif
31