Modify the subvol and snapshot creation ioctls to work anywhere in the tree
authorChris Mason <chris.mason@oracle.com>
Tue, 18 Nov 2008 16:26:35 +0000 (11:26 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 18 Nov 2008 16:26:35 +0000 (11:26 -0500)
commit6c771595afad6e04c25b5adaea8ffbbbfe9c728c
tree57abff520ec457c8493c2d9ccaf7696fb51196be
parent4d1d3a59d6debe80ce1e2da60e82233ab8f1f886
Modify the subvol and snapshot creation ioctls to work anywhere in the tree

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
ioctl.h