2002-02-25 15:02:33 +03:00
/*
* Copyright ( C ) 2002 Sistina Software ( UK ) Limited .
*
* This file is released under the LGPL .
*/
# ifndef _LVM_DEV_MANAGER_H
# define _LVM_DEV_MANAGER_H
# include "metadata.h"
2003-04-25 02:09:13 +04:00
# include "config.h"
2002-02-25 15:02:33 +03:00
struct dev_manager ;
2003-03-24 21:08:53 +03:00
struct dm_info ;
2002-02-25 15:02:33 +03:00
/*
* Constructor and destructor .
*/
2003-04-25 02:09:13 +04:00
struct dev_manager * dev_manager_create ( const char * vg_name ,
struct config_tree * cf ) ;
2002-02-25 15:02:33 +03:00
void dev_manager_destroy ( struct dev_manager * dm ) ;
2003-07-05 02:34:56 +04:00
void dev_manager_exit ( void ) ;
2002-02-25 15:02:33 +03:00
/*
* The device handler is responsible for creating all the layered
* dm devices , and ensuring that all constraints are maintained
* ( eg , an origin is created before its snapshot , but is not
* unsuspended until the snapshot is also created . )
*/
2002-12-20 02:25:55 +03:00
int dev_manager_info ( struct dev_manager * dm , const struct logical_volume * lv ,
2003-11-13 17:11:41 +03:00
int mknodes , struct dm_info * info ) ;
2002-05-22 18:03:45 +04:00
int dev_manager_snapshot_percent ( struct dev_manager * dm ,
struct logical_volume * lv , float * percent ) ;
2003-04-30 19:26:25 +04:00
int dev_manager_mirror_percent ( struct dev_manager * dm ,
struct logical_volume * lv , int wait ,
float * percent , uint32_t * event_nr ) ;
2002-03-14 13:56:09 +03:00
int dev_manager_suspend ( struct dev_manager * dm , struct logical_volume * lv ) ;
2002-02-25 15:02:33 +03:00
int dev_manager_activate ( struct dev_manager * dm , struct logical_volume * lv ) ;
int dev_manager_deactivate ( struct dev_manager * dm , struct logical_volume * lv ) ;
2003-11-12 22:16:48 +03:00
int dev_manager_mknodes ( const struct logical_volume * lv ) ;
int dev_manager_rmnodes ( const struct logical_volume * lv ) ;
2002-02-25 15:02:33 +03:00
/*
* Put the desired changes into effect .
*/
int dev_manager_execute ( struct dev_manager * dm ) ;
# endif