[dm-devel] patch to dm.c to wakeup event waiters when map name changed
goggin, edward
egoggin at emc.com
Thu Nov 10 18:40:08 UTC 2005
Changed dm_hash_rename() to wake up any dm event waiters for
a mapped device after changing the name of the mapped device.
--- ../base/linux-2.6.14-rc4/drivers/md/dm-ioctl.c 2005-10-10
20:19:19.000000000 -0500
+++ drivers/md/dm-ioctl.c 2005-11-03 13:25:57.000000000 -0600
@@ -270,6 +270,7 @@ static int dm_hash_rename(const char *ol
{
char *new_name, *old_name;
struct hash_cell *hc;
+ struct dm_table *table;
/*
* duplicate new.
@@ -317,6 +318,15 @@ static int dm_hash_rename(const char *ol
/* rename the device node in devfs */
register_with_devfs(hc);
+ /*
+ * Wakeup any dm event waiters.
+ */
+ table = dm_get_table(hc->md);
+ if (table) {
+ dm_table_event(table);
+ dm_table_put(table);
+ }
+
up_write(&_hash_lock);
kfree(old_name);
return 0;
More information about the dm-devel
mailing list