Searched hist:"6 f546216e9f9e95d6783547ce6113eb13e2daa54" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/btrfs/ |
H A D | file-item.c | diff 6f546216e9f9e95d6783547ce6113eb13e2daa54 Fri Jan 27 19:47:56 CST 2017 Filipe Manana <fdmanana@suse.com> Btrfs: bulk delete checksum items in the same leaf
Very often we have the checksums for an extent spread in multiple items in the checksums tree, and currently the algorithm to delete them starts by looking for them one by one and then deleting them one by one, which is not optimal since each deletion involves shifting all the other items in the leaf and when the leaf reaches some low threshold, to move items off the leaf into its left and right neighbor leafs. Also, after each item deletion we release our search path and start a new search for other checksums items.
So optimize this by deleting in bulk all the items in the same leaf that contain checksums for the extent being freed.
Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
|