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>
This commit is contained in:
@@ -799,6 +799,12 @@ struct btrfs_root {
|
||||
spinlock_t list_lock;
|
||||
struct list_head dead_list;
|
||||
struct list_head orphan_list;
|
||||
|
||||
/*
|
||||
* right now this just gets used so that a root has its own devid
|
||||
* for stat. It may be used for more later
|
||||
*/
|
||||
struct super_block anon_super;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user