Mailinglist Archive: opensuse-bugs (5243 mails)

< Previous Next >
[Bug 809737] mount -oloop,sizelimit=nnnnnn ignores the sizelimit

--- Comment #1 from Jeff Mahoney <jeffm@xxxxxxxx> 2013-03-15 16:59:21 EDT ---
Created an attachment (id=530023)
--> (
[PATCH] loopdev: sync capacity after setting it

The kernel loop driver will set the gendisk capacity of the device at
LOOP_SET_STATUS64 but won't sync it to the block device until one of two
conditions are met: All open file descriptors referring to the device are
closed (and it will sync when re-opened) or if the LOOP_SET_CAPACITY ioctl
is called to sync it. Since mount opens the device and passes it directly
to the mount syscall after LOOP_SET_STATUS64 without closing and reopening
it, the sizelimit argument is effectively ignroed. The capacity needs to
be synced immediately for it to work as expected.

This patch adds the LOOP_SET_CAPACITY call to loopctx_setup_device since
the device isn't yet released to the user, so it's safe to sync the capacity

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >