Top |
#define | BD_NVDIMM_ERROR |
enum | BDNVDIMMError |
enum | BDNVDIMMNamespaceMode |
BDNVDIMMNamespaceInfo | |
enum | BDNVDIMMTech |
enum | BDNVDIMMTechMode |
void
bd_nvdimm_close (void
);
Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**
gboolean
bd_nvdimm_init (void
);
Initializes the plugin. **This function is called automatically by the library's initialization functions.**
BDNVDIMMNamespaceMode bd_nvdimm_namespace_get_mode_from_str (const gchar *mode_str
,GError **error
);
mode_str |
string representation of mode |
|
error |
place to store error (if any). |
[out][optional] |
mode matching the mode_str
given or BD_NVDIMM_NAMESPACE_MODE_UNKNOWN
in case of no match
Tech category: always available
const gchar * bd_nvdimm_namespace_get_mode_str (BDNVDIMMNamespaceMode mode
,GError **error
);
mode |
mode to get string representation of |
|
error |
place to store error (if any). |
[out][optional] |
string representation of mode
or NULL
in case of error
Tech category: always available.
[transfer none]
gchar * bd_nvdimm_namespace_get_devname (const gchar *device
,GError **error
);
device |
name or path of a block device (e.g. "/dev/pmem0") |
|
error |
place to store error (if any). |
[out][optional] |
namespace device name (e.g. "namespaceX.Y") for device
or NULL
if device
is not a NVDIMM namespace
(error
may be set to indicate error)
Tech category: BD_NVDIMM_TECH_NAMESPACE
-BD_NVDIMM_TECH_MODE_QUERY
.
[transfer full]
gboolean bd_nvdimm_namespace_enable (const gchar *namespace
,const BDExtraArg **extra
,GError **error
);
namespace |
name of the namespace to enable |
|
extra |
extra options (currently unused). |
[nullable][array zero-terminated=1] |
error |
place to store error (if any). |
[out][optional] |
whether the namespace
was successfully enabled or not
Tech category: BD_NVDIMM_TECH_NAMESPACE
-BD_NVDIMM_TECH_MODE_ACTIVATE_DEACTIVATE
gboolean bd_nvdimm_namespace_disable (const gchar *namespace
,const BDExtraArg **extra
,GError **error
);
namespace |
name of the namespace to disable |
|
extra |
extra options (currently unused). |
[nullable][array zero-terminated=1] |
error |
place to store error (if any). |
[out][optional] |
whether the namespace
was successfully disabled or not
Tech category: BD_NVDIMM_TECH_NAMESPACE
-BD_NVDIMM_TECH_MODE_ACTIVATE_DEACTIVATE
BDNVDIMMNamespaceInfo * bd_nvdimm_namespace_info (const gchar *namespace
,const BDExtraArg **extra
,GError **error
);
namespace |
namespace to get information about |
|
extra |
extra options (currently unused). |
[nullable][array zero-terminated=1] |
error |
place to store error (if any). |
[out][optional] |
information about given namespace or NULL
if no such
namespace was found (error
may be set to indicate error)
Tech category: BD_NVDIMM_TECH_NAMESPACE
-BD_NVDIMM_TECH_MODE_QUERY
.
[transfer full]
BDNVDIMMNamespaceInfo ** bd_nvdimm_list_namespaces (const gchar *bus
,const gchar *region
,gboolean idle
,const BDExtraArg **extra
,GError **error
);
bus |
return only namespaces on given bus (specified by name),
|
[nullable] |
region |
return only namespaces on given region (specified by regionX name or region id),
|
[nullable] |
idle |
whether to list idle (not enabled) namespaces too |
|
extra |
extra options for the creation (right now passed to the 'ndctl' utility). |
[nullable][array zero-terminated=1] |
error |
place to store error (if any). |
[out][optional] |
information about the namespaces on bus
and region
or
NULL
if no namespaces were found (error
may be set to indicate error)
Tech category: BD_NVDIMM_TECH_NAMESPACE
-BD_NVDIMM_TECH_MODE_QUERY
.
[array zero-terminated=1]
gboolean bd_nvdimm_namespace_reconfigure (const gchar *namespace
,BDNVDIMMNamespaceMode mode
,gboolean force
,const BDExtraArg **extra
,GError **error
);
namespace |
name of the namespace to reconfigure |
|
mode |
mode type to set (memory/sector/raw/dax) |
|
force |
whether to use force to reconfigure an active namespace |
|
error |
place to store error if any. |
[out][optional] |
extra |
extra options for the creation (right now passed to the 'ndctl' utility). |
[nullable][array zero-terminated=1] |
const guint64 * bd_nvdimm_namespace_get_supported_sector_sizes (BDNVDIMMNamespaceMode mode
,GError **error
);
list of supported sector sizes for mode
Tech category: BD_NVDIMM_TECH_NAMESPACE
-BD_NVDIMM_TECH_MODE_QUERY
.
[transfer none][array zero-terminated=1]
BDNVDIMMNamespaceInfo *
bd_nvdimm_namespace_info_copy (BDNVDIMMNamespaceInfo *info
);
Creates a new copy of info
.
[skip]
void
bd_nvdimm_namespace_info_free (BDNVDIMMNamespaceInfo *info
);
Frees info
.
[skip]
gboolean bd_nvdimm_is_tech_avail (BDNVDIMMTech tech
,guint64 mode
,GError **error
);
tech |
the queried tech |
|
mode |
a bit mask of queried modes of operation (BDNVDIMMTechMode) for |
|
error |
place to store error (details about why the |
[out][optional] |
typedef struct { gchar *dev; guint64 mode; guint64 size; gchar *uuid; guint64 sector_size; gchar *blockdev; gboolean enabled; } BDNVDIMMNamespaceInfo;
gchar * |
namespace device name ("namespaceX.Y") |
|
guint64 |
mode of the namespace (BDNVDIMMNamespaceMode) |
|
guint64 |
size of the namespace |
|
gchar * |
UUID of the namespace |
|
guint64 |
sector size of the namespace (0 for non-sector namespaces) |
|
gchar * |
name of the block device for the namespace |
|
gboolean |
whether the namespace is enabled or not |