diff options
author | Josef Bacik <jbacik@fb.com> | 2014-11-17 23:45:48 +0300 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-01-22 04:36:52 +0300 |
commit | ce93ec548cfa02f9cd6b70d546d5f36f4d160f57 (patch) | |
tree | b6274b12d55c6ed97d3ad508e2cb5c428d74df30 /fs/btrfs/dir-item.c | |
parent | e7070be198b34c26f39bd9010a29ce6462dc4f3e (diff) | |
download | linux-ce93ec548cfa02f9cd6b70d546d5f36f4d160f57.tar.xz |
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/dir-item.c')
0 files changed, 0 insertions, 0 deletions