|
Packit Service |
158247 |
#include <glib.h>
|
|
Packit Service |
158247 |
#include <blockdev/utils.h>
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
GQuark bd_mpath_error_quark (void);
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
#define BD_MPATH_ERROR bd_mpath_error_quark ()
|
|
Packit Service |
158247 |
typedef enum {
|
|
Packit Service |
158247 |
BD_MPATH_ERROR_FLUSH,
|
|
Packit Service |
158247 |
BD_MPATH_ERROR_NOT_ROOT,
|
|
Packit Service |
158247 |
BD_MPATH_ERROR_DM_ERROR,
|
|
Packit Service |
158247 |
BD_MPATH_ERROR_INVAL,
|
|
Packit Service |
158247 |
BD_MPATH_ERROR_TECH_UNAVAIL,
|
|
Packit Service |
158247 |
} BDMpathError;
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
typedef enum {
|
|
Packit Service |
158247 |
BD_MPATH_TECH_BASE = 0,
|
|
Packit Service |
158247 |
BD_MPATH_TECH_FRIENDLY_NAMES,
|
|
Packit Service |
158247 |
} BDMpathTech;
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
typedef enum {
|
|
Packit Service |
158247 |
BD_MPATH_TECH_MODE_QUERY = 1 << 0,
|
|
Packit Service |
158247 |
BD_MPATH_TECH_MODE_MODIFY = 1 << 1,
|
|
Packit Service |
158247 |
} BDMpathTechMode;
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
/**
|
|
Packit Service |
158247 |
* bd_mpath_is_tech_avail:
|
|
Packit Service |
158247 |
* @tech: the queried tech
|
|
Packit Service |
158247 |
* @mode: a bit mask of queried modes of operation for @tech
|
|
Packit Service |
158247 |
* @error: (out): place to store error (details about why the @tech-@mode combination is not available)
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Returns: whether the @tech-@mode combination is avaible -- supported by the
|
|
Packit Service |
158247 |
* plugin implementation and having all the runtime dependencies available
|
|
Packit Service |
158247 |
*/
|
|
Packit Service |
158247 |
gboolean bd_mpath_is_tech_avail (BDMpathTech tech, guint64 mode, GError **error);
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
/**
|
|
Packit Service |
158247 |
* bd_mpath_flush_mpaths:
|
|
Packit Service |
158247 |
* @error: (out): place to store error (if any)
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Returns: whether multipath device maps were successfully flushed or not
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Flushes all unused multipath device maps.
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Tech category: %BD_MPATH_TECH_BASE-%BD_MPATH_TECH_MODE_MODIFY
|
|
Packit Service |
158247 |
*/
|
|
Packit Service |
158247 |
gboolean bd_mpath_flush_mpaths (GError **error);
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
/**
|
|
Packit Service |
158247 |
* bd_mpath_is_mpath_member:
|
|
Packit Service |
158247 |
* @device: device to test
|
|
Packit Service |
158247 |
* @error: (out): place to store error (if any)
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Returns: %TRUE if the device is a multipath member, %FALSE if not or an error
|
|
Packit Service |
158247 |
* appeared when queried (@error is set in those cases)
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Tech category: %BD_MPATH_TECH_BASE-%BD_MPATH_TECH_MODE_QUERY
|
|
Packit Service |
158247 |
*/
|
|
Packit Service |
158247 |
gboolean bd_mpath_is_mpath_member (const gchar *device, GError **error);
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
/**
|
|
Packit Service |
158247 |
* bd_mpath_get_mpath_members:
|
|
Packit Service |
158247 |
* @error: (out): place to store error (if any)
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Returns: (transfer full) (array zero-terminated=1): list of names of all devices that are
|
|
Packit Service |
158247 |
* members of the mpath mappings (or %NULL
|
|
Packit Service |
158247 |
* in case of error)
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Tech category: %BD_MPATH_TECH_BASE-%BD_MPATH_TECH_MODE_QUERY
|
|
Packit Service |
158247 |
*/
|
|
Packit Service |
158247 |
gchar** bd_mpath_get_mpath_members (GError **error);
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
|
|
Packit Service |
158247 |
/**
|
|
Packit Service |
158247 |
* bd_mpath_set_friendly_names:
|
|
Packit Service |
158247 |
* @enabled: whether friendly names should be enabled or not
|
|
Packit Service |
158247 |
* @error: (out): place to store error (if any)
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Returns: if successfully set or not
|
|
Packit Service |
158247 |
*
|
|
Packit Service |
158247 |
* Tech category: %BD_MPATH_TECH_FRIENDLY_NAMES-%BD_MPATH_TECH_MODE_MODIFY
|
|
Packit Service |
158247 |
*/
|
|
Packit Service |
158247 |
gboolean bd_mpath_set_friendly_names (gboolean enabled, GError **error);
|
|
Packit Service |
158247 |
|