summaryrefslogtreecommitdiff
path: root/security/inode.c
diff options
context:
space:
mode:
authorMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>2018-07-31 16:20:21 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-15 09:40:40 +0200
commitaccb3e424b8b6b9fa51b77fcf7e6673f40d182a6 (patch)
treec896da21dec513f9c2eb062ec8c0e8daaa2e6aab /security/inode.c
parent2dc310f837540defcae83edde8bad940e12abcd1 (diff)
btrfs: replace: Reset on-disk dev stats value after replace
[ Upstream commit 1e7e1f9e3aba00c9b9c323bfeeddafe69ff21ff6 ] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/inode.c')
0 files changed, 0 insertions, 0 deletions