This introduces a new btrfsctl option, -m, to allow you to set the default'ly
mounted subvolume. You can do
btrfsctl -m /your/subvolume
and that will make that subvolume the subvolume that is mounted by default, or
you can do
btrfsctl -m <treeid> /any/subvolume
and this will make the subvolume with tree id <treeid> the default'ly mounted
subvolume. You can get the treeid by using the listing option. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
The structure used to send device in btrfs ioctl calls was not
properly aligned, and so 32 bit ioctls would not work properly on
64 bit kernels.
We could fix this with compat ioctls, but we're just one byte away
and it doesn't make sense at this stage to carry about the compat ioctls
forever at this stage in the project.
This patch brings the ioctl arg up to an evenly aligned 4k.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This changes the snapshot and subvol ioctl API and command lines so
that new snapshots and subvols can be created anywhere.
Subvolume creation hasn't changed much:
btrfsctl -S subvol_name directory
This creates a new subvolume under 'directory'
Snapshot creation looks the same, but is actually different:
btrfsctl -s full_path_to_new_snapshot file_or_dir
For example: btrfsctl -s /mnt/new_snap /mnt/subvol
Will create a new snapshot named new_snap under /mnt of the root
found in /mnt/subvol. It always snapshots the entire root regardless of
which file or directory inside the root you give it.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
btrfsctl -c forces a single FS sync
The transaction ioctls are unsafe for general use because they can lead
to deadlocks if the application is not very careful. But, ceph is
experimenting with btrfs as a backing store, and these ioctls are required
for testing.