FS#36189 - [util-linux] losetup offset option is still broken

Attached to Project: Arch Linux
Opened by Vardenis Pavardenis (ffcitatos) - Wednesday, 17 July 2013, 21:21 GMT
Last edited by Dave Reisner (falconindy) - Friday, 19 July 2013, 15:18 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Trying to create a loop device with an offset does not work.

This bug is identical to the bug #35193. I have provided the steps to reproduce the bug.

This is my first bug report ever, please forgive me if I am doing something wrong.


Additional info:
util-linux-2.23.1-2


Steps to reproduce:

[root@myhost ~]# dd if=/dev/urandom of=/root/test.random bs=1M count=3
3+0 records in
3+0 records out
3145728 bytes (3.1 MB) copied, 0.237367 s, 13.3 MB/s
[root@myhost ~]# losetup -f --show -o 15 /root/test.random
losetup: /root/test.random: failed to setup loop device: Success

Proof that I am using the newest version of util-linux:

[root@myhost ~]# losetup -V
losetup from util-linux 2.23.1

[root@myhost ice]# pacman -S util-linux
warning: util-linux-2.23.1-2 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): util-linux-2.23.1-2

Total Installed Size: 8.92 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n] n
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 19 July 2013, 15:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed upstream, see comments
Comment by Dave Reisner (falconindy) - Friday, 19 July 2013, 14:06 GMT
Pinged upstream with a link to this bug report. I don't have time to look into this myself.
Comment by Dave Reisner (falconindy) - Friday, 19 July 2013, 14:58 GMT
What is your use case for having such a small offset? losetup works with a reasonable offset size -- anything larger than a 512 bytes (size of a block).

ignore the above.... seems to be an issue of not using a multiple of the block size.
Comment by Dave Reisner (falconindy) - Friday, 19 July 2013, 15:17 GMT
Fixed upstream, but I'm not backporting this because all it does is fix the error -- your usage is still wrong.

https://github.com/karelzak/util-linux/commit/01307ecf1b1ec8f72377100d67d757f946c9dace

You really need to use a multiple of the block size.

Loading...