Project

General

Profile

Bug #7613

ms_freetree[4] is only used in syncing context

Added by Matthew Ahrens almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2016-11-24
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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).

History

#1

Updated by Matthew Ahrens almost 3 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.

#2

Updated by Electric Monk almost 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 5f145778012b555e084eacc858ead9e1e42bd149

commit  5f145778012b555e084eacc858ead9e1e42bd149
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2016-12-15T18:32:39.000Z

    7613 ms_freetree[4] is only used in syncing context
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Alex Reece <alex@delphix.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF