Top | ![]() |
![]() |
![]() |
![]() |
gboolean | bd_kbd_check_deps () |
gboolean | bd_kbd_init () |
void | bd_kbd_close () |
gboolean | bd_kbd_bcache_attach () |
gboolean | bd_kbd_bcache_create () |
gboolean | bd_kbd_bcache_destroy () |
gboolean | bd_kbd_bcache_detach () |
gchar * | bd_kbd_bcache_get_backing_device () |
gchar * | bd_kbd_bcache_get_cache_device () |
BDKBDBcacheMode | bd_kbd_bcache_get_mode () |
BDKBDBcacheMode | bd_kbd_bcache_get_mode_from_str () |
const gchar * | bd_kbd_bcache_get_mode_str () |
gboolean | bd_kbd_bcache_set_mode () |
BDKBDBcacheStats * | bd_kbd_bcache_stats_copy () |
void | bd_kbd_bcache_stats_free () |
BDKBDBcacheStats * | bd_kbd_bcache_status () |
GQuark | bd_kbd_error_quark () |
gboolean | bd_kbd_zram_create_devices () |
gboolean | bd_kbd_zram_destroy_devices () |
gboolean | bd_kbd_zram_add_device () |
gboolean | bd_kbd_zram_remove_device () |
BDKBDZramStats * | bd_kbd_zram_get_stats () |
BDKBDZramStats * | bd_kbd_zram_stats_copy () |
void | bd_kbd_zram_stats_free () |
enum | BDKBDBcacheMode |
BDKBDBcacheStats | |
enum | BDKBDError |
BDKBDZramStats | |
#define | BD_KBD_ERROR |
gboolean
bd_kbd_init ();
Initializes the plugin. **This function is called automatically by the library's initialization functions.**
void
bd_kbd_close ();
Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**
gboolean bd_kbd_bcache_attach (const gchar *c_set_uuid
,const gchar *bcache_device
,GError **error
);
gboolean bd_kbd_bcache_create (const gchar *backing_device
,const gchar *cache_device
,const BDExtraArg **extra
,const gchar **bcache_device
,GError **error
);
backing_device |
backing (slow) device of the cache |
|
cache_device |
cache (fast) device of the cache |
|
extra |
extra options for the creation (right now passed to the 'make-bcache' utility). |
[allow-none][array zero-terminated=1] |
bcache_device |
place to store the name of the new bcache device (if any). |
[out][allow-none][transfer full] |
error |
place to store error (if any). |
[out] |
gboolean bd_kbd_bcache_destroy (const gchar *bcache_device
,GError **error
);
gboolean bd_kbd_bcache_detach (const gchar *bcache_device
,gchar **c_set_uuid
,GError **error
);
gchar * bd_kbd_bcache_get_backing_device (const gchar *bcache_device
,GError **error
);
gchar * bd_kbd_bcache_get_cache_device (const gchar *bcache_device
,GError **error
);
BDKBDBcacheMode bd_kbd_bcache_get_mode (const gchar *bcache_device
,GError **error
);
BDKBDBcacheMode bd_kbd_bcache_get_mode_from_str (const gchar *mode_str
,GError **error
);
const gchar * bd_kbd_bcache_get_mode_str (BDKBDBcacheMode mode
,GError **error
);
gboolean bd_kbd_bcache_set_mode (const gchar *bcache_device
,BDKBDBcacheMode mode
,GError **error
);
BDKBDBcacheStats *
bd_kbd_bcache_stats_copy (BDKBDBcacheStats *data
);
Creates a new copy of data
.
[skip]
void
bd_kbd_bcache_stats_free (BDKBDBcacheStats *data
);
Frees data
.
[skip]
BDKBDBcacheStats * bd_kbd_bcache_status (const gchar *bcache_device
,GError **error
);
gboolean bd_kbd_zram_create_devices (guint64 num_devices
,const guint64 *sizes
,const guint64 *nstreams
,GError **error
);
gboolean bd_kbd_zram_add_device (guint64 size
,guint64 nstreams
,gchar **device
,GError **error
);
gboolean bd_kbd_zram_remove_device (const gchar *device
,GError **error
);
BDKBDZramStats * bd_kbd_zram_get_stats (const gchar *device
,GError **error
);
BDKBDZramStats *
bd_kbd_zram_stats_copy (BDKBDZramStats *data
);
Creates a new copy of data
.
[skip]
typedef struct { gchar *state; guint64 block_size; guint64 cache_size; guint64 cache_used; guint64 hits; guint64 misses; guint64 bypass_hits; guint64 bypass_misses; } BDKBDBcacheStats;
typedef struct { guint64 disksize; guint64 num_reads; guint64 num_writes; guint64 invalid_io; guint64 zero_pages; guint64 max_comp_streams; gchar* comp_algorithm; guint64 orig_data_size; guint64 compr_data_size; guint64 mem_used_total; } BDKBDZramStats;
see zRAM kernel documentation for details (https://www.kernel.org/doc/Documentation/blockdev/zram.txt)