summaryrefslogtreecommitdiffstats
path: root/libdm/misc
diff options
context:
space:
mode:
authorJonathan Earl Brassow <jbrassow@redhat.com>2011-10-14 14:18:49 +0000
committerJonathan Earl Brassow <jbrassow@redhat.com>2011-10-14 14:18:49 +0000
commit3b032963d5322cb31ce6654f4b51b99db7092ebb (patch)
tree0f5dfa63c290a6dfa9a96103d7281c524136774b /libdm/misc
parent6635332e1b5e0b482227547a8bc1a98caa8a6030 (diff)
downloadlvm2-3b032963d5322cb31ce6654f4b51b99db7092ebb.tar.gz
lvm2-3b032963d5322cb31ce6654f4b51b99db7092ebb.tar.xz
lvm2-3b032963d5322cb31ce6654f4b51b99db7092ebb.zip
cmirrord now returns log name to kernel in CTR so it can be registered
Version 2 of the userspace log protocol accepts return information during the DM_ULOG_CTR exchange. The return information contains the name of the log device that is being used (if there is one). The kernel can then register the device via 'dm_get_device'. Amoung other things, this allows for userspace to assemble a correct dependency tree of devices - critical for LVM handling of suspend/resume calls. Also, update dm-log-userspace.h to match the kernel header associated with this protocol change. (Includes a version inc.)
Diffstat (limited to 'libdm/misc')
-rw-r--r--libdm/misc/dm-log-userspace.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/libdm/misc/dm-log-userspace.h b/libdm/misc/dm-log-userspace.h
index b723e355..33179386 100644
--- a/libdm/misc/dm-log-userspace.h
+++ b/libdm/misc/dm-log-userspace.h
@@ -52,15 +52,20 @@
* Payload-to-userspace:
* A single string containing all the argv arguments separated by ' 's
* Payload-to-kernel:
- * None. ('data_size' in the dm_ulog_request struct should be 0.)
+ * The name of the device that is used as the backing store for the log
+ * data. 'dm_get_device' will be called on this device. ('dm_put_device'
+ * will be called on this device automatically after calling DM_ULOG_DTR.)
+ * If there is no device needed for log data, 'data_size' in the
+ * dm_ulog_request struct should be 0.
*
* The UUID contained in the dm_ulog_request structure is the reference that
* will be used by all request types to a specific log. The constructor must
- * record this assotiation with instance created.
+ * record this assotiation with the instance created.
*
* When the request has been processed, user-space must return the
- * dm_ulog_request to the kernel - setting the 'error' field and
- * 'data_size' appropriately.
+ * dm_ulog_request to the kernel - setting the 'error' field, filling the
+ * data field with the log device if necessary, and setting 'data_size'
+ * appropriately.
*/
#define DM_ULOG_CTR 1
@@ -377,8 +382,11 @@
* dm_ulog_request or a change in the way requests are
* issued/handled. Changes are outlined here:
* version 1: Initial implementation
+ * version 2: DM_ULOG_CTR allowed to return a string containing a
+ * device name that is to be registered with DM via
+ * 'dm_get_device'.
*/
-#define DM_ULOG_REQUEST_VERSION 1
+#define DM_ULOG_REQUEST_VERSION 2
struct dm_ulog_request {
/*