diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-05-21 16:08:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:36 -0500 |
commit | edfaa7c36574f1bf09c65ad602412db9da5f96bf (patch) | |
tree | d591b80ff9229e4845e41d68e2f4c5aadb017027 /drivers/md/dm.c | |
parent | 09f82ea92822a7bbb7e816508abbda47ed54a77f (diff) |
Driver core: convert block from raw kobjects to core devices
This moves the block devices to /sys/class/block. It will create a
flat list of all block devices, with the disks and partitions in one
directory. For compatibility /sys/block is created and contains symlinks
to the disks.
/sys/class/block
|-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
|-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
|-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
|-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
|-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
|-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
|-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
|-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
`-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
/sys/block/
|-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
`-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 88c0fd657825..f2d24eb3208c 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1109,7 +1109,7 @@ static void event_callback(void *context) | |||
1109 | list_splice_init(&md->uevent_list, &uevents); | 1109 | list_splice_init(&md->uevent_list, &uevents); |
1110 | spin_unlock_irqrestore(&md->uevent_lock, flags); | 1110 | spin_unlock_irqrestore(&md->uevent_lock, flags); |
1111 | 1111 | ||
1112 | dm_send_uevents(&uevents, &md->disk->kobj); | 1112 | dm_send_uevents(&uevents, &md->disk->dev.kobj); |
1113 | 1113 | ||
1114 | atomic_inc(&md->event_nr); | 1114 | atomic_inc(&md->event_nr); |
1115 | wake_up(&md->eventq); | 1115 | wake_up(&md->eventq); |
@@ -1530,7 +1530,7 @@ out: | |||
1530 | *---------------------------------------------------------------*/ | 1530 | *---------------------------------------------------------------*/ |
1531 | void dm_kobject_uevent(struct mapped_device *md) | 1531 | void dm_kobject_uevent(struct mapped_device *md) |
1532 | { | 1532 | { |
1533 | kobject_uevent(&md->disk->kobj, KOBJ_CHANGE); | 1533 | kobject_uevent(&md->disk->dev.kobj, KOBJ_CHANGE); |
1534 | } | 1534 | } |
1535 | 1535 | ||
1536 | uint32_t dm_next_uevent_seq(struct mapped_device *md) | 1536 | uint32_t dm_next_uevent_seq(struct mapped_device *md) |