aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-08-10 14:42:37 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-08-10 14:42:37 -0400
commitf2183bde1a918d338337955c8e8ba29bd8f5e7b1 (patch)
treee27baea3779112618d2158902270c460444feeff /fs/btrfs/disk-io.h
parente9d0b13b5bbb58c9b840e407a8d181442f799966 (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.h2
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
26enum btrfs_bh_state_bits { 26enum btrfs_bh_state_bits {
27 BH_Checked = BH_PrivateStart, 27 BH_Checked = BH_PrivateStart,
28 BH_Defrag,
28}; 29};
29BUFFER_FNS(Checked, checked); 30BUFFER_FNS(Checked, checked);
31BUFFER_FNS(Defrag, defrag);
30 32
31static inline struct btrfs_node *btrfs_buffer_node(struct buffer_head *bh) 33static inline struct btrfs_node *btrfs_buffer_node(struct buffer_head *bh)
32{ 34{