mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 17:56:51 +00:00
btrfs-progs: check: drop exclusive open mode for --force
The check opens the given device in exclusive by default. In the forced mode we want to access a device in use, so we have to drop the exclusivity bit. This works for block devices but not for files, that could be mounted via a loop device. In that respect test check/007 is broken and will be fixed. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
37f1faef15
commit
0a694ff4b0
@ -13112,6 +13112,8 @@ int cmd_check(int argc, char **argv)
|
|||||||
warning(
|
warning(
|
||||||
"filesystem mounted, continuing because of --force");
|
"filesystem mounted, continuing because of --force");
|
||||||
}
|
}
|
||||||
|
/* A block device is mounted in exclusive mode by kernel */
|
||||||
|
ctree_flags &= ~OPEN_CTREE_EXCLUSIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* only allow partial opening under repair mode */
|
/* only allow partial opening under repair mode */
|
||||||
|
Loading…
Reference in New Issue
Block a user