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