1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/lib/activate/ll-activate.h
Joe Thornber fdc7af232a o Turn the device_create_* functions into device_populate_*, they only
fill in an already created dm_task.  This allows common code, such
  as minor number selection, and read_only to be lifted.
2002-02-12 11:15:45 +00:00

63 lines
1.4 KiB
C

/*
* Copyright (C) 2002 Sistina Software (UK) Limited.
*
* This file is released under the LGPL.
*/
#ifndef _LVM_LL_ACTIVATE_H
#define _LVM_LL_ACTIVATE_H
#include "metadata.h"
#include <libdevmapper.h>
/*
* Prepares a new dm_task.
*/
struct dm_task *setup_dm_task(const char *name, int task);
/*
* Query functions. 'name' is the device node name in the
* device-mapper dir.
*/
int device_info(const char *name, struct dm_info *info);
int device_active(const char *name);
int device_suspended(const char *name);
int device_open_count(const char *name);
/*
* Functions to manipulate an already active device.
*/
int device_deactivate(const char *name);
int device_suspend(const char *name);
int device_resume(const char *name);
/*
* The next three functions populate a dm_task with a suitable
* set of targets.
*/
/*
* Creates a device with a mapping table as specified by the lv.
*/
int device_populate_lv(struct dm_task *dmt, struct logical_volume *lv);
/*
* Layers the origin device above an already active 'real'
* device.
*/
int device_populate_origin(struct dm_task *dmt, struct logical_volume *lv,
const char *real);
/*
* Creates a snapshot device for a given origin and exception
* storage area.
*/
int device_populate_snapshot(struct dm_task *dmt, struct logical_volume *lv,
const char *origin, const char *cow_device);
#endif