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/ioctl.c | |
parent | 3de4586c5278a28107030c336956381f69ff7a9d (diff) |
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/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index ec45b3086136..773db07b5f72 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -127,7 +127,6 @@ static noinline int create_subvol(struct btrfs_root *root, | |||
127 | key.objectid = objectid; | 127 | key.objectid = objectid; |
128 | key.offset = 1; | 128 | key.offset = 1; |
129 | btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); | 129 | btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); |
130 | printk("inserting root objectid %Lu\n", objectid); | ||
131 | ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, | 130 | ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, |
132 | &root_item); | 131 | &root_item); |
133 | if (ret) | 132 | if (ret) |
@@ -175,7 +174,6 @@ fail: | |||
175 | ret = err; | 174 | ret = err; |
176 | fail_commit: | 175 | fail_commit: |
177 | btrfs_btree_balance_dirty(root, nr); | 176 | btrfs_btree_balance_dirty(root, nr); |
178 | printk("all done ret %d\n", ret); | ||
179 | return ret; | 177 | return ret; |
180 | } | 178 | } |
181 | 179 | ||