* [Kernel PATCH] emit change on devmapper devices
@ 2007-11-07 16:50 Scott James Remnant
2007-11-07 17:18 ` Linas Vepstas
2007-11-12 21:20 ` [dm-devel] " Phillip Susi
0 siblings, 2 replies; 4+ messages in thread
From: Scott James Remnant @ 2007-11-07 16:50 UTC (permalink / raw)
To: linux-hotplug-devel; +Cc: dm-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 421 bytes --]
Hi guys,
I've had this patch sitting on my disk for a few months, and haven't
done anything more than test it. Before I stuff it into git, and send
it to the kernel, would you guys have a look over it and see whether
it's technically correct.
The patch simply causes a kobject "change" event to be emitted on
devmapper block devices when they are renamed.
Scott
--
Scott James Remnant
scott@ubuntu.com
[-- Attachment #1.1.2: Type: text/x-patch, Size: 1524 bytes --]
diff -ruNp linux-source-2.6.22~/drivers/md/dm-ioctl.c linux-source-2.6.22/drivers/md/dm-ioctl.c
--- linux-source-2.6.22~/drivers/md/dm-ioctl.c 2007-07-10 17:54:44.000000000 +0100
+++ linux-source-2.6.22/drivers/md/dm-ioctl.c 2007-07-10 22:01:09.000000000 +0100
@@ -323,6 +323,8 @@ static int dm_hash_rename(const char *ol
hc->name = new_name;
list_add(&hc->name_list, _name_buckets + hash_str(new_name));
+ dm_changed(hc->md);
+
/*
* Wake up any dm event waiters.
*/
diff -ruNp linux-source-2.6.22~/drivers/md/dm.c linux-source-2.6.22/drivers/md/dm.c
--- linux-source-2.6.22~/drivers/md/dm.c 2007-05-13 19:55:50.000000000 +0100
+++ linux-source-2.6.22/drivers/md/dm.c 2007-07-10 22:01:09.000000000 +0100
@@ -1542,6 +1542,11 @@ int dm_noflush_suspending(struct dm_targ
}
EXPORT_SYMBOL_GPL(dm_noflush_suspending);
+void dm_changed(struct mapped_device *md)
+{
+ kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
+}
+
static struct block_device_operations dm_blk_dops = {
.open = dm_blk_open,
.release = dm_blk_close,
diff -ruNp linux-source-2.6.22~/drivers/md/dm.h linux-source-2.6.22/drivers/md/dm.h
--- linux-source-2.6.22~/drivers/md/dm.h 2007-05-13 19:55:50.000000000 +0100
+++ linux-source-2.6.22/drivers/md/dm.h 2007-07-10 22:01:09.000000000 +0100
@@ -151,4 +151,6 @@ union map_info *dm_get_mapinfo(struct bi
int dm_open_count(struct mapped_device *md);
int dm_lock_for_deletion(struct mapped_device *md);
+void dm_changed(struct mapped_device *md);
+
#endif
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 314 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #3: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Kernel PATCH] emit change on devmapper devices
2007-11-07 16:50 [Kernel PATCH] emit change on devmapper devices Scott James Remnant
@ 2007-11-07 17:18 ` Linas Vepstas
2007-11-12 21:20 ` [dm-devel] " Phillip Susi
1 sibling, 0 replies; 4+ messages in thread
From: Linas Vepstas @ 2007-11-07 17:18 UTC (permalink / raw)
To: Scott James Remnant; +Cc: linux-hotplug-devel, dm-devel
On Wed, Nov 07, 2007 at 11:50:07AM -0500, Scott James Remnant wrote:
> Hi guys,
>
> I've had this patch sitting on my disk for a few months, and haven't
....
On my email reader, I see the following:
[-- PGP output follows (current time: Wed 07 Nov 2007 11:16:06 AM CST) --]
gpg: Signature made Wed 07 Nov 2007 10:50:07 AM CST using DSA key ID C978C8AE
gpg: BAD signature from "Scott James Remnant <scott@ubuntu.com>"
[-- End of PGP output --]
I've never seen a bad signature before ... I thought that was weird.
--linas
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-devel] [Kernel PATCH] emit change on devmapper devices
2007-11-07 16:50 [Kernel PATCH] emit change on devmapper devices Scott James Remnant
2007-11-07 17:18 ` Linas Vepstas
@ 2007-11-12 21:20 ` Phillip Susi
2007-11-12 21:34 ` Alasdair G Kergon
1 sibling, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2007-11-12 21:20 UTC (permalink / raw)
To: device-mapper development; +Cc: linux-hotplug-devel
Scott James Remnant wrote:
> Hi guys,
>
> I've had this patch sitting on my disk for a few months, and haven't
> done anything more than test it. Before I stuff it into git, and send
> it to the kernel, would you guys have a look over it and see whether
> it's technically correct.
>
> The patch simply causes a kobject "change" event to be emitted on
> devmapper block devices when they are renamed.
When they are renamed? Don't you want a change event when you modify
the table?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-12 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 16:50 [Kernel PATCH] emit change on devmapper devices Scott James Remnant
2007-11-07 17:18 ` Linas Vepstas
2007-11-12 21:20 ` [dm-devel] " Phillip Susi
2007-11-12 21:34 ` Alasdair G Kergon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).