summaryrefslogtreecommitdiff
tag namereflink-speedups_2021-03-25 (d42b11facb598a368b4e403242933a2203625344)
tag date2021-03-25 17:10:10 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 7c2b52fe75...
xfs: fix reflink inefficiencies
As Dave Chinner has complained about on IRC, there are a couple of things about reflink that are very inefficient. First of all, we limited the size of all bunmapi operations to avoid flooding the log with defer ops in the worst case, but recent changes to the defer ops code have solved that problem, so get rid of the bunmapi length clamp. Second, the log reservations for reflink operations are far far larger than they need to be. Shrink them to exactly what we need to handle each deferred RUI and CUI log item, and no more. Also reduce logcount because we don't need 8 rolls per operation. Introduce a transaction reservation compatibility layer to avoid changing the minimum log size calculations.