diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-11-17 21:02:50 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-17 21:02:50 -0500 |
commit | 3de4586c5278a28107030c336956381f69ff7a9d (patch) | |
tree | d636e3806cd5ecff71927d0300e46526fa23de1a /fs/btrfs/transaction.h | |
parent | 4ce4cb526f67775c1cce3e3fa01c292672ba874e (diff) | |
download | kernel_samsung_espresso10-3de4586c5278a28107030c336956381f69ff7a9d.zip kernel_samsung_espresso10-3de4586c5278a28107030c336956381f69ff7a9d.tar.gz kernel_samsung_espresso10-3de4586c5278a28107030c336956381f69ff7a9d.tar.bz2 |
Btrfs: Allow subvolumes and snapshots anywhere in the directory tree
Before, all snapshots and subvolumes lived in a single flat directory. This
was awkward and confusing because the single flat directory was only writable
with the ioctls.
This commit changes the ioctls to create subvols and snapshots at any
point in the directory tree. This requires making separate ioctls for
snapshot and subvol creation instead of a combining them into one.
The subvol ioctl does:
btrfsctl -S subvol_name parent_dir
After the ioctl is done subvol_name lives inside parent_dir.
The snapshot ioctl does:
btrfsctl -s path_for_snapshot root_to_snapshot
path_for_snapshot can be an absolute or relative path. btrfsctl breaks it up
into directory and basename components.
root_to_snapshot can be any file or directory in the FS. The snapshot
is taken of the entire root where that file lives.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r-- | fs/btrfs/transaction.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index eef2cb7..202c8be 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -47,8 +47,10 @@ struct btrfs_trans_handle { }; struct btrfs_pending_snapshot { + struct dentry *dentry; struct btrfs_root *root; char *name; + struct btrfs_key root_key; struct list_head list; }; |