#include <layout.h>
|
uint32_t(* | leo_nr )(const struct m0_layout_enum *e) |
|
void(* | leo_get )(const struct m0_layout_enum *e, uint32_t idx, const struct m0_fid *gfid, struct m0_fid *out) |
|
m0_bcount_t(* | leo_recsize )(struct m0_layout_enum *e) |
|
void(* | leo_fini )(struct m0_layout_enum *e) |
|
void(* | leo_delete )(struct m0_layout_enum *e) |
|
int(* | leo_decode )(struct m0_layout_enum *e, struct m0_bufvec_cursor *cur, enum m0_layout_xcode_op op, struct m0_be_tx *tx, struct m0_striped_layout *stl) |
|
int(* | leo_encode )(const struct m0_layout_enum *le, enum m0_layout_xcode_op op, struct m0_be_tx *tx, struct m0_bufvec_cursor *out) |
|
Definition at line 429 of file layout.h.
◆ leo_decode
Continues building the in-memory layout object, the enum part of it specifically, either from the buffer or from the DB.
- Parameters
-
op | This enum parameter indicates what if a DB operation is to be performed on the layout record and it could be LOOKUP if at all. If it is BUFFER_OP, then the layout is decoded from its representation received through the buffer. |
- Precondition
- M0_IN(op, (M0_LXO_DB_LOOKUP, M0_LXO_BUFFER_OP))
-
ergo(op == M0_LXO_DB_LOOKUP, tx != NULL)
- Postcondition
- The cursor cur is advanced by the size of the data that is read from it.
Definition at line 482 of file layout.h.
◆ leo_delete
Finalises the enum object that is only allocated and not populated.
Definition at line 466 of file layout.h.
◆ leo_encode
Continues to use the in-memory layout object, the enum part of it specifically and either 'stores it in the Layout DB' or 'converts it to a buffer'.
- Parameters
-
op | This enum parameter indicates what is the DB operation to be performed on the layout record if at all and it could be one of ADD/UPDATE/DELETE. If it is BUFFER_OP, then the layout is converted into a buffer. |
- Precondition
- M0_IN(op, (M0_LXO_DB_ADD, M0_LXO_DB_UPDATE, M0_LXO_DB_DELETE, M0_LXO_BUFFER_OP))
-
ergo(op != M0_LXO_BUFFER_OP, tx != NULL)
Definition at line 502 of file layout.h.
◆ leo_fini
Finalises the enum object.
Dual to enum type specific build procedure but not to be invoked directly by the user in regular course of action since enum object is finalised internally as a part finalising layout object. This interface is required to be used by an external user in cases where layout build operation fails and the user (for example m0t1fs) needs to get rid of the enumeration object created prior to attempting the layout build operation.
Definition at line 460 of file layout.h.
◆ leo_get
Returns idx-th object in the enumeration.
- Precondition
- idx < e->l_enum_ops->leo_nr(e)
Definition at line 437 of file layout.h.
◆ leo_nr
Returns number of objects in the enumeration.
Definition at line 431 of file layout.h.
◆ leo_recsize
Returns size of the part of the layouts table record required to store enum details, for the specified enumeration object.
- Invariant
- e->le_ops->leo_recsize(e) <= e->le_type->let_ops->leto_max_recsize();
Definition at line 447 of file layout.h.
The documentation for this struct was generated from the following file: