[dm-devel] [PATCH][RFC] dm+syfs

Mike Christie mikenc at us.ibm.com
Wed Oct 15 06:31:01 UTC 2003


Currently, a dm device has an entry in /sys/block/dm-* that only 
displays the block layer attributes (queue, iosched and stats). With the 
attached patch (dm_sysfs.patch) the dm's attributes can now also be 
displayed in sysfs. For example, from /sys/block/dm-3 a table with three 
linear targets would look like this:

|-- dev
|-- mapped_device
|   |-- event_nr
|   |-- flags
|   `-- table
|       |-- target0
|       |   |-- num_sectors
|       |   |-- ram2
|       |   |   |-- ram2 -> ../../../../../../block/ram2
|       |   |   `-- start
|       |   |-- start_sector
|       |   `-- type
|       `-- target1
|           |-- num_sectors
|           |-- ram3
|           |   |-- ram3 -> ../../../../../../block/ram3
|           |   `-- start
|           |-- start_sector
|           `-- type
|-- queue
|   |-- iosched
|   `-- nr_requests
|-- range
|-- size
`-- stat

or a table with a striped target that has three devies would look like 
the following from /sys/block/dm-3:

|-- dev
|-- mapped_device
|   |-- event_nr
|   |-- flags
|   `-- table
|       `-- target0
|           |-- chunk_size
|           |-- num_sectors
|           |-- num_stripes
|           |-- ram4
|           |   |-- ram4 -> ../../../../../../block/ram4
|           |   `-- start
|           |-- ram5
|           |   |-- ram5 -> ../../../../../../block/ram5
|           |   `-- start
|           |-- ram6
|           |   |-- ram6 -> ../../../../../../block/ram6
|           |   `-- start
|           |-- start_sector
|           `-- type
|-- queue
|   |-- iosched
|   `-- nr_requests
|-- range
|-- size
`-- stat

dm_sysfs.patch was built against 2.6.0-test7.


Mike Christie
mikenc at us.ibm.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dm_sysfs.patch
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20031015/0a00790b/attachment.ksh>


More information about the dm-devel mailing list