]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: one iteration to detect overlap and reuse loopdev
authorKarel Zak <kzak@redhat.com>
Thu, 4 Aug 2016 09:48:26 +0000 (11:48 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 4 Aug 2016 09:48:26 +0000 (11:48 +0200)
commitdff7e1604680ee0118a04233ef365aebb869c9db
tree8b50f04c4d3ae2ac60200f5a28ef8a853a890255
parentc444a71b1ba216b39707b41ebade2e35f6a256b7
libmount: one iteration to detect overlap and reuse loopdev

The current code scans loopdevs to detect already used loop device and
another scan to detect overlap.

Let's use one scan only, for this purpose loopcxt_find_overlap() has
been modified to return info (rc==2) about full size and offset match.

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/loopdev.c
libmount/src/context_loopdev.c