aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-11-17 20:42:26 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-17 20:42:26 -0500
commit3394e1607eaf870ebba37d303fbd590a4c569908 (patch)
tree7833927ae6137122bea670544147be6a69f804ad /fs/btrfs/ctree.h
parent3de4586c5278a28107030c336956381f69ff7a9d (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/ctree.h')
-rw-r--r--fs/btrfs/ctree.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 5611f8e035a4..b3bc65b08c6a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -799,6 +799,12 @@ struct btrfs_root {
799 spinlock_t list_lock; 799 spinlock_t list_lock;
800 struct list_head dead_list; 800 struct list_head dead_list;
801 struct list_head orphan_list; 801 struct list_head orphan_list;
802
803 /*
804 * right now this just gets used so that a root has its own devid
805 * for stat. It may be used for more later
806 */
807 struct super_block anon_super;
802}; 808};
803 809
804/* 810/*