loopdev regression with v2.23
Hi,
I have a bug report that points out that v2.23 has disallowed losetup of a block device with an offset:
https://bugs.archlinux.org/task/35193
As I also note in the bug report, I've bisected this to commit 293714c0d15.
I'm not clear on what the proper fix is here -- "expected_size" is set to 0 since the fstat call is performed on a special file which has a 0 size. Is the right thing to do simply return 0 if the size of the "backing file" is 0?
There's also the problem of the error message -- the fabricated ERANGE return fails to also set errno=ERANGE before returning.
Cheers,
Dave
Karel Zak
maintainerQuoted 11 lines · Dave Reisner
I have a bug report that points out that v2.23 has disallowed losetup of a block device with an offset:
https://bugs.archlinux.org/task/35193
As I also note in the bug report, I've bisected this to commit
293714c0d15.I'm not clear on what the proper fix is here -- "
expected_size" is set to 0 since the fstat call is performed on a special file which has a 0 size. Is the right thing to do simply return 0 if the size of the "backing file" is 0?
The right thing is to use size of the block device if the backing file is a block device. Fixed. Git pull.
All this is workaround for kernel bug (already fixed in v3.9). I hope that one day we will use KERNEL_VERSION macro to exclude all this painful thing :-)
Thanks!
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com