]> git.karo-electronics.de Git - mv-sheeva.git/commit
loop: add some basic read-only sysfs attributes
authorMilan Broz <mbroz@redhat.com>
Mon, 23 Aug 2010 13:16:00 +0000 (15:16 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Mon, 23 Aug 2010 13:18:10 +0000 (15:18 +0200)
commitee86273062cbb310665fe49e1f1937d2cf85b0b9
treecca87f85feafedb52bcc0687b6daa6b15895b199
parent9ee47476d6734c9deb9ae9ab05d963302f6b6150
loop: add some basic read-only sysfs attributes

Create /sys/block/loopX/loop directory and provide these attributes:
 - backing_file
 - autoclear
 - offset
 - sizelimit

This loop directory is present only if loop device is configured.

To be used in util-linux-ng (and possibly elsewhere like udev rules)
where code need to get loop attributes from kernel (and not store
duplicate info in userspace).

Moreover loop ioctls are not even able to provide full backing
file info because of buffer limits.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/loop.c