Skip to content
Commit 06d9a8d7 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: Change btrfs_truncate_inode_items to stop when it hits the inode



btrfs_truncate_inode_items is setup to stop doing btree searches when
it has finished removing the items for the inode.  It used to detect the
end of the inode by looking for an objectid that didn't match the
one we were searching for.

But, this would result in an extra search through the btree, which
adds extra balancing and cow costs to the operation.

This commit adds a check to see if we found the inode item, which means
we can stop searching early.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent f03d9301
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment