summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2014-11-17 15:45:48 -0500
committerChris Mason <clm@fb.com>2015-01-21 17:36:52 -0800
commitce93ec548cfa02f9cd6b70d546d5f36f4d160f57 (patch)
treeb6274b12d55c6ed97d3ad508e2cb5c428d74df30 /fs/btrfs/ctree.c
parente7070be198b34c26f39bd9010a29ce6462dc4f3e (diff)
Btrfs: track dirty block groups on their own list
Currently any time we try to update the block groups on disk we will walk _all_ block groups and check for the ->dirty flag to see if it is set. This function can get called several times during a commit. So if you have several terabytes of data you will be a very sad panda as we will loop through _all_ of the block groups several times, which makes the commit take a while which slows down the rest of the file system operations. This patch introduces a dirty list for the block groups that we get added to when we dirty the block group for the first time. Then we simply update any block groups that have been dirtied since the last time we called btrfs_write_dirty_block_groups. This allows us to clean up how we write the free space cache out so it is much cleaner. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
0 files changed, 0 insertions, 0 deletions