diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-11-17 20:42:26 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-17 20:42:26 -0500 |
commit | 3394e1607eaf870ebba37d303fbd590a4c569908 (patch) | |
tree | 7833927ae6137122bea670544147be6a69f804ad /fs/btrfs/transaction.c | |
parent | 3de4586c5278a28107030c336956381f69ff7a9d (diff) | |
download | linux-3394e1607eaf870ebba37d303fbd590a4c569908.tar.bz2 |
Btrfs: Give each subvol and snapshot their own anonymous devid
Each subvolume has its own private inode number space, and so we need
to fill in different device numbers for each subvolume to avoid confusing
applications.
This commit puts a struct super_block into struct btrfs_root so it can
call set_anon_super() and get a different device number generated for
each root.
btrfs_rename is changed to prevent renames across subvols.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index eec8b2465039..93f23a456a36 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -832,13 +832,13 @@ static noinline int finish_pending_snapshot(struct btrfs_fs_info *fs_info, struct inode *parent_inode; struct inode *inode; - trans = btrfs_start_transaction(fs_info->fs_root, 1); + parent_inode = pending->dentry->d_parent->d_inode; + trans = btrfs_start_transaction(BTRFS_I(parent_inode)->root, 1); /* * insert the directory item */ namelen = strlen(pending->name); - parent_inode = pending->dentry->d_parent->d_inode; ret = btrfs_set_inode_index(parent_inode, &index); ret = btrfs_insert_dir_item(trans, BTRFS_I(parent_inode)->root, |