]> git.baikalelectronics.ru Git - kernel.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)
commit9a8b6df21b947409221f0d8abc91d644a2c319ac
treecca87f85feafedb52bcc0687b6daa6b15895b199
parentd6b2632e406081b983c3ea8c9ef512f0154820e9
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