]> git.ipfire.org Git - thirdparty/systemd.git/commit
loop-util: when clearing a loopback device delete partitions first, and take BSD...
authorLennart Poettering <lennart@poettering.net>
Thu, 1 Sep 2022 10:32:48 +0000 (12:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 1 Sep 2022 18:41:08 +0000 (20:41 +0200)
commit3a6ed1e19d2929270e8cd11375d5d34072336450
treeebdb61d9b4bb94e4696668e4b5a844f5e52deb14
parentff27ef4b598ca6b26381c6abc124641a228f0d85
loop-util: when clearing a loopback device delete partitions first, and take BSD lock

Whenever we release a loopback device, let's first synchronously delete
all partitions, so that we know that's complete and not done
asynchronously in the background. Take a BSD lock on the device while
doing so, so that udev won't make the devices busy while we do this.
src/shared/loop-util.c