2 * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3 * Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
5 * This file is part of LVM2.
7 * This copyrighted material is made available to anyone wishing to use,
8 * modify, copy, or redistribute it subject to the terms and conditions
9 * of the GNU Lesser General Public License v.2.1.
11 * You should have received a copy of the GNU Lesser General Public License
12 * along with this program; if not, write to the Free Software Foundation,
13 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 struct replicator_device;
24 struct logical_volume {
28 struct volume_group *vg;
36 uint64_t size; /* Sectors */
39 uint32_t origin_count;
40 struct dm_list snapshot_segs;
41 struct lv_segment *snapshot;
43 struct replicator_device *rdevice;/* For replicator-devs, rimages, slogs - reference to rdevice */
44 struct dm_list rsites; /* For replicators - all sites */
46 struct dm_list segments;
48 struct dm_list segs_using_this_lv;
51 uint64_t lv_size(const struct logical_volume *lv);
52 char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv);
53 char *lv_uuid_dup(const struct logical_volume *lv);
54 char *lv_tags_dup(const struct logical_volume *lv);
55 char *lv_path_dup(struct dm_pool *mem, const struct logical_volume *lv);
56 uint64_t lv_origin_size(const struct logical_volume *lv);
57 char *lv_move_pv_dup(struct dm_pool *mem, const struct logical_volume *lv);
58 char *lv_convert_lv_dup(struct dm_pool *mem, const struct logical_volume *lv);
59 int lv_kernel_major(const struct logical_volume *lv);
60 int lv_kernel_minor(const struct logical_volume *lv);
61 char *lv_mirror_log_dup(struct dm_pool *mem, const struct logical_volume *lv);
62 char *lv_modules_dup(struct dm_pool *mem, const struct logical_volume *lv);
63 char *lv_name_dup(struct dm_pool *mem, const struct logical_volume *lv);
64 char *lv_origin_dup(struct dm_pool *mem, const struct logical_volume *lv);
65 uint32_t lv_kernel_read_ahead(const struct logical_volume *lv);
66 uint64_t lvseg_start(const struct lv_segment *seg);
67 uint64_t lvseg_size(const struct lv_segment *seg);
68 uint64_t lvseg_chunksize(const struct lv_segment *seg);
69 char *lvseg_segtype_dup(const struct lv_segment *seg);
70 char *lvseg_tags_dup(const struct lv_segment *seg);
72 #endif /* _LVM_LV_H */