diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-05-15 03:48:23 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-06-14 11:29:41 -0400 |
commit | 199c2a9c3d1389db7f7a211e64f6809d352ce5f6 (patch) | |
tree | 8f1e921492d1d5a7b61d98900e8cb3b1b40abdba /fs/btrfs/ctree.h | |
parent | eb73c1b7cea7d533288ef5297a0ea0e159db85b0 (diff) |
Btrfs: introduce per-subvolume ordered extent list
The reason we introduce per-subvolume ordered extent list is the same
as the per-subvolume delalloc inode list.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 43c073533940..905f7c6c82f3 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -1437,17 +1437,18 @@ struct btrfs_fs_info { | |||
1437 | atomic_t open_ioctl_trans; | 1437 | atomic_t open_ioctl_trans; |
1438 | 1438 | ||
1439 | /* | 1439 | /* |
1440 | * this is used by the balancing code to wait for all the pending | 1440 | * this is used to protect the following list -- ordered_roots. |
1441 | * ordered extents | ||
1442 | */ | 1441 | */ |
1443 | spinlock_t ordered_extent_lock; | 1442 | spinlock_t ordered_root_lock; |
1444 | 1443 | ||
1445 | /* | 1444 | /* |
1446 | * all of the data=ordered extents pending writeback | 1445 | * all fs/file tree roots in which there are data=ordered extents |
1446 | * pending writeback are added into this list. | ||
1447 | * | ||
1447 | * these can span multiple transactions and basically include | 1448 | * these can span multiple transactions and basically include |
1448 | * every dirty data page that isn't from nodatacow | 1449 | * every dirty data page that isn't from nodatacow |
1449 | */ | 1450 | */ |
1450 | struct list_head ordered_extents; | 1451 | struct list_head ordered_roots; |
1451 | 1452 | ||
1452 | spinlock_t delalloc_root_lock; | 1453 | spinlock_t delalloc_root_lock; |
1453 | /* all fs/file tree roots that have delalloc inodes. */ | 1454 | /* all fs/file tree roots that have delalloc inodes. */ |
@@ -1753,6 +1754,20 @@ struct btrfs_root { | |||
1753 | struct list_head delalloc_inodes; | 1754 | struct list_head delalloc_inodes; |
1754 | struct list_head delalloc_root; | 1755 | struct list_head delalloc_root; |
1755 | u64 nr_delalloc_inodes; | 1756 | u64 nr_delalloc_inodes; |
1757 | /* | ||
1758 | * this is used by the balancing code to wait for all the pending | ||
1759 | * ordered extents | ||
1760 | */ | ||
1761 | spinlock_t ordered_extent_lock; | ||
1762 | |||
1763 | /* | ||
1764 | * all of the data=ordered extents pending writeback | ||
1765 | * these can span multiple transactions and basically include | ||
1766 | * every dirty data page that isn't from nodatacow | ||
1767 | */ | ||
1768 | struct list_head ordered_extents; | ||
1769 | struct list_head ordered_root; | ||
1770 | u64 nr_ordered_extents; | ||
1756 | }; | 1771 | }; |
1757 | 1772 | ||
1758 | struct btrfs_ioctl_defrag_range_args { | 1773 | struct btrfs_ioctl_defrag_range_args { |