diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-08-10 14:42:37 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-08-10 14:42:37 -0400 |
commit | f2183bde1a918d338337955c8e8ba29bd8f5e7b1 (patch) | |
tree | e27baea3779112618d2158902270c460444feeff /fs/btrfs/disk-io.h | |
parent | e9d0b13b5bbb58c9b840e407a8d181442f799966 (diff) |
Btrfs: Add BH_Defrag to mark buffers that are in need of defragging
This allows the tree walking code to defrag only the newly allocated
buffers, it seems to be a good balance between perfect defragging and the
performance hit of repeatedly reallocating blocks.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index 9e2c261b41ae..81fd18cbd824 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h | |||
@@ -25,8 +25,10 @@ | |||
25 | 25 | ||
26 | enum btrfs_bh_state_bits { | 26 | enum btrfs_bh_state_bits { |
27 | BH_Checked = BH_PrivateStart, | 27 | BH_Checked = BH_PrivateStart, |
28 | BH_Defrag, | ||
28 | }; | 29 | }; |
29 | BUFFER_FNS(Checked, checked); | 30 | BUFFER_FNS(Checked, checked); |
31 | BUFFER_FNS(Defrag, defrag); | ||
30 | 32 | ||
31 | static inline struct btrfs_node *btrfs_buffer_node(struct buffer_head *bh) | 33 | static inline struct btrfs_node *btrfs_buffer_node(struct buffer_head *bh) |
32 | { | 34 | { |