On Tue, 2017-12-05 at 21:54 +0100, David Disseldorp wrote: > A read-only block device must currently be flagged as such when > configuring the iblock backstore, via a readonly=1 configfs parameter. > If a read-only block device is used without explicitly providing the > parameter, then backstore enablement fails with EACCES, e.g. > losetup --read-only /dev/loop0 /lofile > mkdir -p /sys/kernel/config/target/core/iblock_0/loopy > echo "udev_path=/dev/loop0" \ > > /sys/kernel/config/target/core/iblock_0/loopy/control > echo "1" > /sys/kernel/config/target/core/iblock_0/loopy/enable > sh: echo: write error: Permission denied > > This change allows an iblock backstore to be demoted to read-only if the > underlying device is detected as such, via a -EACCES return value from > blkdev_get_by_path(udev_path=$readonly_device, mode & FMODE_WRITE, ...). Hello David, Although the patch itself looks fine to me: do we really need this kind of functionality in the kernel? Is it possible to implement the same functionality in user space? Thanks, Bart.��.n��������+%������w��{.n����j�����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��