FreeBSD ZFS
The Zettabyte File System
|
Go to the source code of this file.
Functions | |
uint64_t | dmu_object_alloc (objset_t *os, dmu_object_type_t ot, int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) |
Chooses an unallocated object number and returns a new object that uses it in *objectp. | |
int | dmu_object_claim (objset_t *os, uint64_t object, dmu_object_type_t ot, int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) |
Allocates an object for the specified object number. | |
int | dmu_object_reclaim (objset_t *os, uint64_t object, dmu_object_type_t ot, int blocksize, dmu_object_type_t bonustype, int bonuslen) |
int | dmu_object_free (objset_t *os, uint64_t object, dmu_tx_t *tx) |
Free an object from this objset. | |
int | dmu_object_next (objset_t *os, uint64_t *objectp, boolean_t hole, uint64_t txg) |
Find the next allocated or free object. |
uint64_t dmu_object_alloc | ( | objset_t * | os, |
dmu_object_type_t | ot, | ||
int | blocksize, | ||
dmu_object_type_t | bonus_type, | ||
int | bonus_len, | ||
dmu_tx_t * | tx | ||
) |
Chooses an unallocated object number and returns a new object that uses it in *objectp.
Allocate an object from this objset. The range of object numbers available is (0, DN_MAX_OBJECT). Object 0 is the meta-dnode.
The transaction must be assigned to a txg. The newly allocated object will be "held" in the transaction (ie. you can modify the newly allocated object in this transaction).
Definition at line 31 of file dmu_object.c.
int dmu_object_claim | ( | objset_t * | os, |
uint64_t | object, | ||
dmu_object_type_t | ot, | ||
int | blocksize, | ||
dmu_object_type_t | bonus_type, | ||
int | bonus_len, | ||
dmu_tx_t * | tx | ||
) |
Allocates an object for the specified object number.
0 | Success |
EEXIST | The object number is already allocated |
Definition at line 86 of file dmu_object.c.
Free an object from this objset.
The object's data will be freed as well (ie. you don't need to call dmu_free(object, 0, -1, tx)).
The object need not be held in the transaction.
0 | Success |
EBUSY | There are holds on this object's buffers (via dmu_buf_hold()) or tx holds on the object (via dmu-tx_hold_object()) so it cannot be freed |
ENOENT | The object is not allocated |
Definition at line 164 of file dmu_object.c.
int dmu_object_next | ( | objset_t * | os, |
uint64_t * | objectp, | ||
boolean_t | hole, | ||
uint64_t | txg | ||
) |
Find the next allocated or free object.
[in,out] | objectp | Will be updated to the next object which is allocated |
[in] | txg | ignore objects which have not been modified since txt |
0 | Success |
ENOENT | There are no more objects |
Definition at line 185 of file dmu_object.c.
int dmu_object_reclaim | ( | objset_t * | os, |
uint64_t | object, | ||
dmu_object_type_t | ot, | ||
int | blocksize, | ||
dmu_object_type_t | bonustype, | ||
int | bonuslen | ||
) |
Definition at line 106 of file dmu_object.c.