aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.h
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2009-06-22 05:12:30 -0400
committerAlasdair G Kergon <agk@redhat.com>2009-06-22 05:12:30 -0400
commit60935eb21d3c5bac79618000f38f92c249d153c4 (patch)
tree0fcd78d7d69e23cd062e5214ddf2959d5c74e605 /drivers/md/dm.h
parent486d220fe4909b5745c4faa67faddd30a707abe2 (diff)
dm ioctl: support cookies for udev
Add support for passing a 32 bit "cookie" into the kernel with the DM_SUSPEND, DM_DEV_RENAME and DM_DEV_REMOVE ioctls. The (unsigned) value of this cookie is returned to userspace alongside the uevents issued by these ioctls in the variable DM_COOKIE. This means the userspace process issuing these ioctls can be notified by udev after udev has completed any actions triggered. To minimise the interface extension, we pass the cookie into the kernel in the event_nr field which is otherwise unused when calling these ioctls. Incrementing the version number allows userspace to determine in advance whether or not the kernel supports the cookie. If the kernel does support this but userspace does not, there should be no impact as the new variable will just get ignored. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r--drivers/md/dm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index a31506d93e91..b5935c610c44 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -92,7 +92,8 @@ void dm_stripe_exit(void);
92int dm_open_count(struct mapped_device *md); 92int dm_open_count(struct mapped_device *md);
93int dm_lock_for_deletion(struct mapped_device *md); 93int dm_lock_for_deletion(struct mapped_device *md);
94 94
95void dm_kobject_uevent(struct mapped_device *md); 95void dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
96 unsigned cookie);
96 97
97int dm_kcopyd_init(void); 98int dm_kcopyd_init(void);
98void dm_kcopyd_exit(void); 99void dm_kcopyd_exit(void);