Updated: October 28, 2024 |
Find a free region of a particular space type
#include <qvm/gasp.h>
uint64_t gasp_find_free(const struct guest_system *gsp, unsigned qst, uint64_t size, uint64_t align)
This function is not thread-safe. You must call gasp_lock() before calling this function, to ensure that no other vdev can claim the region you need, then call gasp_unlock() when work is complete.
The starting location for free space, or QSL_NO_LOCATION if nothing is available.