]> git.ipfire.org Git - thirdparty/systemd.git/commit
loop-util: LOOP_CONFIGURE ignores lo_sizelimit 16676/head
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Aug 2020 16:11:06 +0000 (18:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Aug 2020 20:01:13 +0000 (22:01 +0200)
commitbb2551bdcb7f1bbc91099351474ca4a415f826ea
tree766b2c79cbc57d4c0be57f244e5ad0e1395fbb31
parentc2f418d5951a89a1313bfa7ac75ec4ed9bf51bca
loop-util: LOOP_CONFIGURE ignores lo_sizelimit

It appears LOOP_CONFIGURE in 5.8 is even more broken than initially
thought: it doesn't properly propgate lo_sizelimit to the block device
layer. :-(

Let's hence check the block device size immediately after issuing
LOOP_CONFIGURE, and if it doesn't match what we just set let's fallback
to the old ioctls.

This means LOOP_CONFIGURE currently works correctly only for the most
simply case: no partition table logic and no size limit. Sad!

(Kernel people should really be told about the concepts of tests and
even CI, one day!)
src/shared/loop-util.c