2005-04-20 00:52:35 +04:00
/*
* Copyright ( C ) 2005 Red Hat , Inc . All rights reserved .
*
* This file is part of LVM2 .
*
* This copyrighted material is made available to anyone wishing to use ,
* modify , copy , or redistribute it subject to the terms and conditions
2007-08-21 00:55:30 +04:00
* of the GNU Lesser General Public License v .2 .1 .
2005-04-20 00:52:35 +04:00
*
2007-08-21 00:55:30 +04:00
* You should have received a copy of the GNU Lesser General Public License
2005-04-20 00:52:35 +04:00
* along with this program ; if not , write to the Free Software Foundation ,
* Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
*/
# ifndef _LVM_PV_ALLOC_H
2005-10-17 03:03:59 +04:00
int alloc_pv_segment_whole_pv ( struct dm_pool * mem , struct physical_volume * pv ) ;
2008-11-04 01:14:30 +03:00
int peg_dup ( struct dm_pool * mem , struct dm_list * peg_new , struct dm_list * peg_old ) ;
2005-05-03 21:28:23 +04:00
struct pv_segment * assign_peg_to_lvseg ( struct physical_volume * pv , uint32_t pe ,
uint32_t area_len ,
struct lv_segment * seg ,
uint32_t area_num ) ;
2010-03-31 21:23:18 +04:00
int pv_split_segment ( struct dm_pool * mem ,
struct physical_volume * pv , uint32_t pe ,
2010-03-31 21:22:26 +04:00
struct pv_segment * * pvseg_allocated ) ;
2012-06-27 23:07:04 +04:00
int discard_pv_segment ( struct pv_segment * peg , uint32_t discard_area_reduction ) ;
2005-06-01 20:51:55 +04:00
int release_pv_segment ( struct pv_segment * peg , uint32_t area_reduction ) ;
2005-05-03 21:28:23 +04:00
int check_pv_segments ( struct volume_group * vg ) ;
void merge_pv_segments ( struct pv_segment * peg1 , struct pv_segment * peg2 ) ;
2005-04-20 00:52:35 +04:00
# endif