From: "goggin, edward" After changing the name of a mapped device, trigger a dm event. (For userspace multipath tools.) Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton --- drivers/md/dm-ioctl.c | 10 ++++++++++ 1 files changed, 10 insertions(+) diff -puN drivers/md/dm-ioctl.c~device-mapper-ioctl-event-on-rename drivers/md/dm-ioctl.c --- devel/drivers/md/dm-ioctl.c~device-mapper-ioctl-event-on-rename 2005-11-18 18:16:09.000000000 -0800 +++ devel-akpm/drivers/md/dm-ioctl.c 2005-11-18 18:16:09.000000000 -0800 @@ -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); + /* + * Wake up 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; _