]>
sourceware.org Git - lvm2.git/blob - lib/activate/dev_manager.h
2 * Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.
3 * Copyright (C) 2004-2012 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
16 #ifndef _LVM_DEV_MANAGER_H
17 #define _LVM_DEV_MANAGER_H
19 #include "metadata-exported.h"
21 struct logical_volume
;
22 struct lv_activate_opts
;
29 int read_only_lv(struct logical_volume
*lv
, struct lv_activate_opts
*laopts
);
32 * Constructor and destructor.
34 struct dev_manager
*dev_manager_create(struct cmd_context
*cmd
,
36 unsigned track_pvmove_deps
);
37 void dev_manager_destroy(struct dev_manager
*dm
);
38 void dev_manager_release(void);
39 void dev_manager_exit(void);
42 * The device handler is responsible for creating all the layered
43 * dm devices, and ensuring that all constraints are maintained
44 * (eg, an origin is created before its snapshot, but is not
45 * unsuspended until the snapshot is also created.)
47 int dev_manager_info(struct dm_pool
*mem
, const struct logical_volume
*lv
,
49 int with_open_count
, int with_read_ahead
,
50 struct dm_info
*info
, uint32_t *read_ahead
);
51 int dev_manager_snapshot_percent(struct dev_manager
*dm
,
52 const struct logical_volume
*lv
,
54 int dev_manager_mirror_percent(struct dev_manager
*dm
,
55 const struct logical_volume
*lv
, int wait
,
56 percent_t
*percent
, uint32_t *event_nr
);
57 int dev_manager_thin_pool_status(struct dev_manager
*dm
,
58 const struct logical_volume
*lv
,
59 struct dm_status_thin_pool
**status
);
60 int dev_manager_thin_pool_percent(struct dev_manager
*dm
,
61 const struct logical_volume
*lv
,
62 int metadata
, percent_t
*percent
);
63 int dev_manager_thin_percent(struct dev_manager
*dm
,
64 const struct logical_volume
*lv
,
65 int mapped
, percent_t
*percent
);
66 int dev_manager_suspend(struct dev_manager
*dm
, struct logical_volume
*lv
,
67 struct lv_activate_opts
*laopts
, int lockfs
, int flush_required
);
68 int dev_manager_activate(struct dev_manager
*dm
, struct logical_volume
*lv
,
69 struct lv_activate_opts
*laopts
);
70 int dev_manager_preload(struct dev_manager
*dm
, struct logical_volume
*lv
,
71 struct lv_activate_opts
*laopts
, int *flush_required
);
72 int dev_manager_deactivate(struct dev_manager
*dm
, struct logical_volume
*lv
);
73 int dev_manager_transient(struct dev_manager
*dm
, struct logical_volume
*lv
) __attribute__((nonnull(1, 2)));
75 int dev_manager_mknodes(const struct logical_volume
*lv
);
78 * Put the desired changes into effect.
80 int dev_manager_execute(struct dev_manager
*dm
);
82 int dev_manager_device_uses_vg(struct device
*dev
,
83 struct volume_group
*vg
);
This page took 0.092875 seconds and 5 git commands to generate.