Attaching a patch which handles devices under /sys/devices/xen
Created attachment 6225 [details] [review] hal-xen.patch
Hi, this looks pretty good to me and we should commit it to HEAD. I'm curious how it works - so e.g. for virtualized block devices there is an entry in /sys/block with a link to the xen bus device? Also, IIRC xen block devices are not partitioned; the file system is on the topmost block device yes? (sorry for being slow, I pay a lot more attention to the mailing list than the bugs)
(In reply to comment #2) > I'm curious how it works - so e.g. for virtualized block devices there is an > entry in /sys/block with a link to the xen bus device? Also, IIRC xen block > devices are not partitioned; the file system is on the topmost block device > yes? Best way to explain is just to show it, I guess :-) $> ls -l /sys/block/xvda/ total 0 -r--r--r-- 1 root root 4096 Aug 2 16:15 dev lrwxrwxrwx 1 root root 0 Aug 2 16:15 device -> ../../devices/xen/vbd-51712 drwxr-xr-x 2 root root 0 Aug 2 16:15 holders drwxr-xr-x 3 root root 0 Aug 2 16:15 queue -r--r--r-- 1 root root 4096 Aug 2 16:15 range -r--r--r-- 1 root root 4096 Aug 2 16:15 removable -r--r--r-- 1 root root 4096 Aug 2 16:15 size drwxr-xr-x 2 root root 0 Aug 2 16:15 slaves -r--r--r-- 1 root root 4096 Aug 2 16:15 stat lrwxrwxrwx 1 root root 0 Aug 2 16:15 subsystem -> ../../block --w------- 1 root root 4096 Aug 2 16:15 uevent drwxr-xr-x 3 root root 0 Aug 2 16:17 xvda1 drwxr-xr-x 3 root root 0 Aug 2 16:15 xvda2 drwxr-xr-x 3 root root 0 Aug 2 16:15 xvda3 As you can see, they can be partitioned ... this one has three partitions. $> ls -l /sys/block/xvda/xvda1/ total 0 -r--r--r-- 1 root root 4096 Aug 2 16:15 dev drwxr-xr-x 2 root root 0 Aug 2 16:15 holders -r--r--r-- 1 root root 4096 Aug 2 16:17 size -r--r--r-- 1 root root 4096 Aug 2 16:17 start -r--r--r-- 1 root root 4096 Aug 2 16:17 stat lrwxrwxrwx 1 root root 0 Aug 2 16:15 subsystem -> ../../../block --w------- 1 root root 4096 Aug 2 16:15 uevent $> ls -l /sys/devices/xen/vbd-51712/ total 0 lrwxrwxrwx 1 root root 0 Aug 2 16:15 block:xvda -> ../../../block/xvda lrwxrwxrwx 1 root root 0 Aug 2 16:15 bus -> ../../../bus/xen -r--r--r-- 1 root root 4096 Aug 2 16:15 devtype lrwxrwxrwx 1 root root 0 Aug 2 16:15 driver -> ../../../bus/xen/drivers/vbd -r--r--r-- 1 root root 4096 Aug 2 16:15 nodename drwxr-xr-x 2 root root 0 Aug 2 16:15 power lrwxrwxrwx 1 root root 0 Aug 2 16:15 subsystem -> ../../../bus/xen --w------- 1 root root 4096 Aug 2 16:15 uevent $> cat /sys/devices/xen/vbd-51712/nodename device/vbd/51712 $> cat /sys/devices/xen/vbd-51712/devtype vbd Virtual network interfaces work similarly.
Committed http://gitweb.freedesktop.org/?p=hal;a=commit;h=9512652670bbb48a4b5c64547047617296e57d19 Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.