loopback device

simon guinot sguinot at lacie.com
Fri Feb 20 03:27:58 PST 2009


Hello,

I am interested to add loopback device support in hald.
For example hald could store volumes information for a multi partition
disk image and permit a mount operation...

A use case could be:

modprobe loop max_part=8
losetup /dev/loop0 /tmp/disk_img_with_partitions
=> some hal stuff and automount

After a quick loop at the hald/linux/blockdev.c, it appear that a device
need a parent to be handled by hald. As a loopback device depend from
any bus, the /sys/block/loop?/device symlink file is missing...

May be it is possible to handle a loopback device in a quite same way as
a md device ?

I have attached a test patch to this mail. It make loopback devices and
partitions available in the hal database... and a mount operation based
on this information can be performed.

Of course my patch is naive and probably wrong. The point is that i know
almost nothing about the hald internals. So... any help to put me on the
right track is welcome.

Thanks in advance.

Simon




This e-mail and any attachment are confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. Unauthorized publication, use, dissemination, forwarding, printing or copying of this e-mail and its associated attachments is strictly prohibited.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-loopback.patch
Type: text/x-patch
Size: 2769 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20090220/17392f73/attachment.bin 


More information about the hal mailing list