ms_freetree is only used in syncing context
metaslab_t:ms_freetree[TXG_SIZE] is only used in syncing context. We should replace it with two trees: the freeing tree (ranges that we are freeing this syncing txg) and the freed tree (ranges which have been freed this txg).
Updated by Matthew Ahrens about 4 years ago
Note: this is a code cleanup issue; this change will increase readability / maintainability of the relevant code. There's no change in behavior (performance or otherwise).
The current code (ms_freetree[TXG_SIZE]) implies that there is one tree per txg, and one might think that you can free things in future txg's by modifying the appropriate entry in this array, but that is not how it works.
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 5f145778012b555e084eacc858ead9e1e42bd149 Author: Matthew Ahrens <email@example.com> Date: 2016-12-15T18:32:39.000Z 7613 ms_freetree is only used in syncing context Reviewed by: George Wilson <firstname.lastname@example.org> Reviewed by: Alex Reece <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>