Open DaanDeMeyer opened 1 year ago
This basically comes down to is_same_loop_file() being too strict. Having one loop device use another loop device can be perfectly safe as long as the loop device does not refer to any part of the other loop device that is actually in use.
If I try to run mkfs.btrfs on a loop device that represents a specific offset + size of another loop device, and that other loop device has existing partitions that are mounted, mkfs.btrfs will fail with "ERROR: /dev/loopxxx is mounted". Given that it's a completely different filesystem that is actually mounted, mkfs.btrfs should not fail in this case or at least provide an option to override the check.