Btrfs: Fix per root used space accounting
authorYan, Zheng <zheng.yan@oracle.com>
Thu, 12 Nov 2009 09:36:50 +0000 (09:36 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:19:57 +0000 (13:19 -0700)
commitfeeeea7814620242d12186c91f877b883d0cf13f
tree99749a0dbc04158a1710940ec4616b1770c909e3
parentc87afd35a28b2661a2626a1b28e9fd69adcad9f9
Btrfs: Fix per root used space accounting

commit 86b9f2eca5e0984145e3c7698a7cd6dd65c2a93f upstream.

The bytes_used field in root item was originally planned to
trace the amount of used data and tree blocks. But it never
worked right since we can't trace freeing of data accurately.
This patch changes it to only trace the amount of tree blocks.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/ioctl.c
fs/btrfs/transaction.c