Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230671
b: refs/heads/master
c: 86a54a4
h: refs/heads/master
i:
  230669: 96b70b1
  230667: 8383e89
  230663: 9e1fa36
  230655: 09898ce
v: v3
  • Loading branch information
Jonathan Brassow authored and Alasdair G Kergon committed Jan 13, 2011
1 parent 328487c commit 314a783
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 085ae0651b2791f3a430ddb76da92925b9952e13
refs/heads/master: 86a54a4802df10d23ccd655e2083e812fe990243
6 changes: 4 additions & 2 deletions trunk/drivers/md/dm-log-userspace-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#include "dm-log-userspace-transfer.h"

#define DM_LOG_USERSPACE_VSN "1.1.0"

struct flush_entry {
int type;
region_t region;
Expand Down Expand Up @@ -765,7 +767,7 @@ static int __init userspace_dirty_log_init(void)
return r;
}

DMINFO("version 1.0.0 loaded");
DMINFO("version " DM_LOG_USERSPACE_VSN " loaded");
return 0;
}

Expand All @@ -775,7 +777,7 @@ static void __exit userspace_dirty_log_exit(void)
dm_ulog_tfr_exit();
mempool_destroy(flush_entry_pool);

DMINFO("version 1.0.0 unloaded");
DMINFO("version " DM_LOG_USERSPACE_VSN " unloaded");
return;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/md/dm-log-userspace-transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,

memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg));
memcpy(tfr->uuid, uuid, DM_UUID_LEN);
tfr->version = DM_ULOG_REQUEST_VERSION;
tfr->luid = luid;
tfr->seq = dm_ulog_seq++;

Expand Down
13 changes: 12 additions & 1 deletion trunk/include/linux/dm-log-userspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,16 @@
#define DM_ULOG_REQUEST_TYPE(request_type) \
(DM_ULOG_REQUEST_MASK & (request_type))

/*
* DM_ULOG_REQUEST_VERSION is incremented when there is a
* change to the way information is passed between kernel
* and userspace. This could be a structure change of
* dm_ulog_request or a change in the way requests are
* issued/handled. Changes are outlined here:
* version 1: Initial implementation
*/
#define DM_ULOG_REQUEST_VERSION 1

struct dm_ulog_request {
/*
* The local unique identifier (luid) and the universally unique
Expand All @@ -383,8 +393,9 @@ struct dm_ulog_request {
*/
uint64_t luid;
char uuid[DM_UUID_LEN];
char padding[7]; /* Padding because DM_UUID_LEN = 129 */
char padding[3]; /* Padding because DM_UUID_LEN = 129 */

uint32_t version; /* See DM_ULOG_REQUEST_VERSION */
int32_t error; /* Used to report back processing errors */

uint32_t seq; /* Sequence number for request */
Expand Down

0 comments on commit 314a783

Please sign in to comment.