Version 1.02.110 -
======================================
+ Add dm_hold_control_dev to allow holding of control device open.
Add dm_report_compact_given_fields to remove given empty fields from report.
Use libdm status parsing and local mem raid dmeventd plugin.
Use local mem pool and lock only lvm2 execution for mirror dmeventd plugin.
static uint32_t _dm_device_major = 0;
static int _control_fd = -1;
+static int _hold_control_fd_open = 0;
static int _version_checked = 0;
static int _version_ok = 1;
static unsigned _ioctl_buffer_double_factor = 0;
return 0;
}
+void dm_hold_control_dev(int hold_open)
+{
+ _hold_control_fd_open = hold_open ? 1 : 0;
+
+ log_debug("Hold of control device is now %sset.",
+ _hold_control_fd_open ? "" : "un");
+}
+
void dm_lib_release(void)
{
- _close_control_fd();
+ if (!_hold_control_fd_open)
+ _close_control_fd();
dm_timestamp_destroy(_dm_ioctl_timestamp);
_dm_ioctl_timestamp = NULL;
update_devs();
void dm_lib_release(void);
void dm_lib_exit(void) __attribute__((destructor));
+/* An optimisation for clients making repeated calls involving dm ioctls */
+void dm_hold_control_dev(int hold_open);
+
/*
* Use NULL for all devices.
*/