Btrfs: Tune the automatic defrag code
authorChris Mason <chris.mason@oracle.com>
Thu, 25 Oct 2007 19:43:18 +0000 (15:43 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:57 +0000 (11:03 -0400)
commit5708b9591617486bf1aa5b1a97f2c0549ec87933
treee2d5f219c090ecda4bc9265027b41be2c70a57ad
parent18f16f7ba62a01c29e09b40ac6ad6d92a8955859
Btrfs: Tune the automatic defrag code

1) Forced defrag wasn't working properly (btrfsctl -d) because some
cache only checks were incorrect.

2) Defrag only the leaves unless in forced defrag mode.

3) Don't use complex logic to figure out if a leaf is needs defrag

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.c
fs/btrfs/tree-defrag.c