btrfs-progs/cmds
David Sterba 3c49295e8a btrfs-progs: subvol set-default: change id to 5 if specified as 0
The id 0 of the default subvolume is an internal alias for the toplevel
fs tree, kernel does that conversion. Until 2116398b1d ("btrfs-progs:
use libbtrfsutil for set-default") there was no manual conversion and
the value was passed to kernel as-is. With the switch to the
libbtrfsutil API this got broken (4.19).

  $ btrfs subvol set-default 0 /path

In this case the default subvolume would be containing subvolume of
/path instead of the toplevel one.

Fix it by manually switching the 0 to 5 in case user specifies that to
avoid the difference in the API, that we can't change.

Issue: #327
Reported-by: Chris Murphy
Signed-off-by: David Sterba <dsterba@suse.com>
2021-01-18 17:49:23 +01:00
..
balance.c btrfs-progs: add enqueue parameter for exclusive ops 2020-12-16 17:08:12 +01:00
commands.h btrfs-progs: help: define helper for command with flags 2019-07-03 20:49:04 +02:00
device.c btrfs-progs: device stats: add json output format 2020-12-16 17:08:53 +01:00
filesystem-du.c btrfs-progs: fix short/long unit size options 2020-12-16 17:08:52 +01:00
filesystem-usage.c btrfs-progs: a bunch of typo fixes 2021-01-13 22:33:10 +01:00
filesystem-usage.h
filesystem.c btrfs-progs: add enqueue parameter for exclusive ops 2020-12-16 17:08:12 +01:00
inspect-dump-super.c btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
inspect-dump-tree.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
inspect-tree-stats.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
inspect.c btrfs-progs: inspect: use find_mount_fsroot in logical-resolve 2021-01-18 17:49:22 +01:00
property.c btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
qgroup.c btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
quota.c btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
receive-dump.c btrfs-progs: move send-utils.c to common/ 2020-08-31 17:01:04 +02:00
receive-dump.h btrfs-progs: move send-dump.c to cmds/receive-dump.c 2020-08-31 17:01:04 +02:00
receive.c btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
replace.c btrfs-progs: add enqueue parameter for exclusive ops 2020-12-16 17:08:12 +01:00
rescue-chunk-recover.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
rescue-super-recover.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
rescue.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
rescue.h btrfs-progs: super-recover: add global verbose option 2020-06-12 19:31:37 +02:00
restore.c btrfs-progs: docs: fix typo in btrfs restore message 2020-09-08 21:59:52 +02:00
scrub.c btrfs-progs: fix short/long unit size options 2020-12-16 17:08:52 +01:00
send.c btrfs-progs: send: fix crash on unknown option 2021-01-13 22:33:09 +01:00
subvolume.c btrfs-progs: subvol set-default: change id to 5 if specified as 0 2021-01-18 17:49:23 +01:00