diff options
author | Josef Bacik <josef@redhat.com> | 2009-12-11 16:11:29 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-15 11:00:08 -0400 |
commit | 6ef5ed0d386be5c43ec66d6f2999919c0893558b (patch) | |
tree | 7ec391a0525506eb03bcbb0b5e19709f530b0b74 /fs/btrfs/ctree.h | |
parent | 73f73415caddbc01d9f10c03e0a677d5b3d11569 (diff) |
Btrfs: add ioctl and incompat flag to set the default mount subvol
This patch needs to go along with my previous patch. This lets us set the
default dir item's location to whatever root we want to use as our default
mounting subvol. With this we don't have to use mount -o subvol=<tree id>
anymore to mount a different subvol, we can just set the new one and it will
just magically work. I've done some moderate testing with this, mostly just
switching the default mount around, mounting subvols and the default mount at
the same time and such, everything seems to work. Thanks,
Older kernels would generally be able to still mount the filesystem with the
default subvolume set, but it would result in a different volume being mounted,
which could be an even more unpleasant suprise for users. So if you set your
default subvolume, you can't go back to older kernels. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 07d956977a07..1166b15e9bf6 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -373,11 +373,13 @@ struct btrfs_super_block { | |||
373 | * ones specified below then we will fail to mount | 373 | * ones specified below then we will fail to mount |
374 | */ | 374 | */ |
375 | #define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0) | 375 | #define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0) |
376 | #define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (2ULL << 0) | ||
376 | 377 | ||
377 | #define BTRFS_FEATURE_COMPAT_SUPP 0ULL | 378 | #define BTRFS_FEATURE_COMPAT_SUPP 0ULL |
378 | #define BTRFS_FEATURE_COMPAT_RO_SUPP 0ULL | 379 | #define BTRFS_FEATURE_COMPAT_RO_SUPP 0ULL |
379 | #define BTRFS_FEATURE_INCOMPAT_SUPP \ | 380 | #define BTRFS_FEATURE_INCOMPAT_SUPP \ |
380 | BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF | 381 | (BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF | \ |
382 | BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL) | ||
381 | 383 | ||
382 | /* | 384 | /* |
383 | * A leaf is full of items. offset and size tell us where to find | 385 | * A leaf is full of items. offset and size tell us where to find |