2010-09-30 17:16:55 +04:00
/*
2010-10-01 00:47:18 +04:00
* Copyright ( C ) 2001 - 2004 Sistina Software , Inc . All rights reserved .
* Copyright ( C ) 2004 - 2010 Red Hat , Inc . All rights reserved .
2010-09-30 17:16:55 +04:00
*
* 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
* of the GNU Lesser General Public License v .2 .1 .
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program ; if not , write to the Free Software Foundation ,
* Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
*/
2010-10-25 16:01:59 +04:00
# ifndef _LVM_LV_H
# define _LVM_LV_H
2010-09-30 17:16:55 +04:00
union lvid ;
struct volume_group ;
struct dm_list ;
struct lv_segment ;
struct replicator_device ;
struct logical_volume {
union lvid lvid ;
2011-02-18 17:47:28 +03:00
const char * name ;
2010-09-30 17:16:55 +04:00
struct volume_group * vg ;
uint64_t status ;
alloc_policy_t alloc ;
uint32_t read_ahead ;
int32_t major ;
int32_t minor ;
uint64_t size ; /* Sectors */
uint32_t le_count ;
uint32_t origin_count ;
struct dm_list snapshot_segs ;
struct lv_segment * snapshot ;
struct replicator_device * rdevice ; /* For replicator-devs, rimages, slogs - reference to rdevice */
struct dm_list rsites ; /* For replicators - all sites */
struct dm_list segments ;
struct dm_list tags ;
struct dm_list segs_using_this_lv ;
} ;
uint64_t lv_size ( const struct logical_volume * lv ) ;
2010-09-30 17:52:55 +04:00
char * lv_attr_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-09-30 18:07:47 +04:00
char * lv_uuid_dup ( const struct logical_volume * lv ) ;
2010-09-30 18:08:19 +04:00
char * lv_tags_dup ( const struct logical_volume * lv ) ;
2010-10-12 20:11:34 +04:00
char * lv_path_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-10-12 20:11:48 +04:00
uint64_t lv_origin_size ( const struct logical_volume * lv ) ;
2010-10-12 20:12:02 +04:00
char * lv_move_pv_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-10-12 20:12:18 +04:00
char * lv_convert_lv_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-10-12 20:12:33 +04:00
int lv_kernel_major ( const struct logical_volume * lv ) ;
int lv_kernel_minor ( const struct logical_volume * lv ) ;
2010-10-12 20:12:50 +04:00
char * lv_mirror_log_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-10-12 20:13:06 +04:00
char * lv_modules_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-10-21 18:49:10 +04:00
char * lv_name_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-10-21 18:49:20 +04:00
char * lv_origin_dup ( struct dm_pool * mem , const struct logical_volume * lv ) ;
2010-10-21 18:49:31 +04:00
uint32_t lv_kernel_read_ahead ( const struct logical_volume * lv ) ;
2010-11-17 23:08:14 +03:00
uint64_t lvseg_start ( const struct lv_segment * seg ) ;
uint64_t lvseg_size ( const struct lv_segment * seg ) ;
uint64_t lvseg_chunksize ( const struct lv_segment * seg ) ;
2011-03-05 15:14:00 +03:00
char * lvseg_segtype_dup ( struct dm_pool * mem , const struct lv_segment * seg ) ;
2010-11-17 23:08:14 +03:00
char * lvseg_tags_dup ( const struct lv_segment * seg ) ;
2011-04-12 16:24:29 +04:00
char * lvseg_devices ( struct dm_pool * mem , const struct lv_segment * seg ) ;
char * lvseg_seg_pe_ranges ( struct dm_pool * mem , const struct lv_segment * seg ) ;
2010-09-30 17:16:55 +04:00
2010-10-25 16:01:59 +04:00
# endif /* _LVM_LV_H */