Misono Tomohiro 1e7e1f9e3a btrfs: replace: Reset on-disk dev stats value after replace
on-disk devs stats value is updated in btrfs_run_dev_stats(),
which is called during commit transaction, if device->dev_stats_ccnt
is not zero.

Since current replace operation does not touch dev_stats_ccnt,
on-disk dev stats value is not updated. Therefore "btrfs device stats"
may return old device's value after umount/mount
(Example: See "btrfs ins dump-t -t DEV $DEV" after btrfs/100 finish).

Fix this by just incrementing dev_stats_ccnt in
btrfs_dev_replace_finishing() when replace is succeeded and this will
update the values.

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-08-06 13:13:01 +02:00
..
2018-08-06 13:12:41 +02:00
2018-08-06 13:12:59 +02:00
2018-08-06 13:12:43 +02:00
2018-08-06 13:12:43 +02:00
2018-04-12 16:29:55 +02:00
2018-03-26 15:09:39 +02:00
2018-08-06 13:12:43 +02:00
2018-08-06 13:12:43 +02:00
2018-08-06 13:12:43 +02:00
2018-08-06 13:12:43 +02:00