• Naohiro Aota's avatar
    btrfs: zoned: introduce space_info->active_total_bytes · 6a921de5
    Naohiro Aota authored
    The active_total_bytes, like the total_bytes, accounts for the total bytes
    of active block groups in the space_info.
    
    With an introduction of active_total_bytes, we can check if the reserved
    bytes can be written to the block groups without activating a new block
    group. The check is necessary for metadata allocation on zoned
    filesystem. We cannot finish a block group, which may require waiting
    for the current transaction, from the metadata allocation context.
    Instead, we need to ensure the ongoing allocation (reserved bytes) fits
    in active block groups.
    Signed-off-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    6a921de5
block-group.c 123 KB