diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-22 09:22:07 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:02 -0400 |
commit | b30757178dad19a0388d958ff9eea66e674d39ed (patch) | |
tree | de2ff27889daaa15180d49d3d04474cc8ee1f927 /fs/btrfs/volumes.h | |
parent | 3c12ac7205d4bd679fefa722aa9b61385e4b4749 (diff) |
Btrfs: Add a special device list for chunk allocations
This allows other code that needs to walk every device in the FS to do so
without locking against allocations.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index dfe7e8a9507c..a2660d2b6b34 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -24,9 +24,12 @@ | |||
24 | struct buffer_head; | 24 | struct buffer_head; |
25 | struct btrfs_device { | 25 | struct btrfs_device { |
26 | struct list_head dev_list; | 26 | struct list_head dev_list; |
27 | struct list_head dev_alloc_list; | ||
27 | struct btrfs_root *dev_root; | 28 | struct btrfs_root *dev_root; |
28 | struct buffer_head *pending_io; | 29 | struct buffer_head *pending_io; |
30 | |||
29 | int barriers; | 31 | int barriers; |
32 | |||
30 | spinlock_t io_lock; | 33 | spinlock_t io_lock; |
31 | 34 | ||
32 | struct block_device *bdev; | 35 | struct block_device *bdev; |
@@ -70,7 +73,11 @@ struct btrfs_fs_devices { | |||
70 | u64 num_devices; | 73 | u64 num_devices; |
71 | struct block_device *latest_bdev; | 74 | struct block_device *latest_bdev; |
72 | struct block_device *lowest_bdev; | 75 | struct block_device *lowest_bdev; |
76 | /* all of the devices in the FS */ | ||
73 | struct list_head devices; | 77 | struct list_head devices; |
78 | |||
79 | /* devices not currently being allocated */ | ||
80 | struct list_head alloc_list; | ||
74 | struct list_head list; | 81 | struct list_head list; |
75 | }; | 82 | }; |
76 | 83 | ||