Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • fs
  • btrfs
  • dev-replace.c
Find file BlameHistoryPermalink
  • Misono Tomohiro's avatar
    btrfs: replace: Reset on-disk dev stats value after replace · e22b36a3
    Misono Tomohiro authored Jul 31, 2018
    [ Upstream commit 1e7e1f9e
    
     ]
    
    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: default avatarMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e22b36a3
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7