mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
btrfs: stop reading free space inodes from the commit root
Free space inode data was only read when loading the v1 cache, which is gone, so btrfs_get_extent() and btrfs_lookup_bio_sums() no longer need to search the commit root for them. Assisted-by: LLM Signed-off-by: Tal Zussman <tz2294@columbia.edu> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
86ba02e70d
commit
a09f52a06d
|
|
@ -396,17 +396,6 @@ int btrfs_lookup_bio_sums(struct btrfs_bio *bbio)
|
|||
if (nblocks > fs_info->csums_per_leaf)
|
||||
path->reada = READA_FORWARD;
|
||||
|
||||
/*
|
||||
* the free space stuff is only read when it hasn't been
|
||||
* updated in the current transaction. So, we can safely
|
||||
* read from the commit root and sidestep a nasty deadlock
|
||||
* between reading the free space cache and updating the csum tree.
|
||||
*/
|
||||
if (btrfs_is_free_space_inode(inode)) {
|
||||
path->search_commit_root = true;
|
||||
path->skip_locking = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are searching for a csum of an extent from a past
|
||||
* transaction, we can search in the commit root and reduce
|
||||
|
|
|
|||
|
|
@ -7232,16 +7232,6 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
|
|||
/* Chances are we'll be called again, so go ahead and do readahead */
|
||||
path->reada = READA_FORWARD;
|
||||
|
||||
/*
|
||||
* The same explanation in load_free_space_cache applies here as well,
|
||||
* we only read when we're loading the free space cache, and at that
|
||||
* point the commit_root has everything we need.
|
||||
*/
|
||||
if (btrfs_is_free_space_inode(inode)) {
|
||||
path->search_commit_root = true;
|
||||
path->skip_locking = true;
|
||||
}
|
||||
|
||||
ret = btrfs_lookup_file_extent(NULL, root, path, objectid, start, 0);
|
||||
if (ret < 0) {
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user