/* * Qgroup equivalent for @size @reserved * * Unlike normal @size/@reserved for inode rsv, qgroup doesn't care * about things like csum size nor how many tree blocks it will need to * reserve. * * Qgroup cares more about net change of the extent usage. * * So for one newly inserted file extent, in worst case it will cause * leaf split and level increase, nodesize for each file extent is * already too much. * * In short, qgroup_size/reserved is the upper limit of possible needed * qgroup metadata reservation.
*/
u64 qgroup_rsv_size;
u64 qgroup_rsv_reserved;
};
/* * Fast path to check if the reserve is full, may be carefully used outside of * locks.
*/ staticinlinebool btrfs_block_rsv_full(conststruct btrfs_block_rsv *rsv)
{ return data_race(rsv->full);
}
/* * Get the reserved mount of a block reserve in a context where getting a stale * value is acceptable, instead of accessing it directly and trigger data race * warning from KCSAN.
*/ staticinline u64 btrfs_block_rsv_reserved(struct btrfs_block_rsv *rsv)
{
u64 ret;
spin_lock(&rsv->lock);
ret = rsv->reserved;
spin_unlock(&rsv->lock);
return ret;
}
/* * Get the size of a block reserve in a context where getting a stale value is * acceptable, instead of accessing it directly and trigger data race warning * from KCSAN.
*/ staticinline u64 btrfs_block_rsv_size(struct btrfs_block_rsv *rsv)
{
u64 ret;
spin_lock(&rsv->lock);
ret = rsv->size;
spin_unlock(&rsv->lock);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.