Btrfs: read device stats on mount, write modified ones during commit

The device statistics are written into the device tree with each
transaction commit. Only modified statistics are written.
When a filesystem is mounted, the device statistics for each involved
device are read from the device tree and used to initialize the
counters.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
This commit is contained in:
Stefan Behrens 2012-05-25 16:06:10 +02:00 • committed by Josef Bacik
commit 733f4fbbc1
6 changed files with 232 additions and 0 deletions