-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: fix overly strict is_same_loop_file()
is_same_loop_file() protects us from doing mkfs.btrfs on a loopback device that's already mounted. Unfortunately it's too strict, erroring out even in some cases where mkfs would be safe. This has resulted in systemd having to do some ugly code to work around this (see systemd/systemd#28033). Get the offset and sizelimit of each loopback device, and allow mkfs if there's no overlap. Fixes #640. Signed-off-by: Mark Harmstone <[email protected]>
- Loading branch information
1 parent
c5e723b
commit ec00247
Showing
1 changed file
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters