Data Structures |
struct | sa_attr_table |
| Array of known attributes and their various characteristics. More...
|
struct | sa_lot |
| Each unique layout will have their own table sa_lot (layout_table) More...
|
struct | sa_idx_tab |
| index table of offsets More...
|
struct | sa_os |
| Since the offset/index information into the actual data will usually be identical we can share that information with all handles that have the exact same offsets. More...
|
struct | sa_hdr_phys |
| header for all bonus and spill buffers. More...
|
struct | sa_handle |
| Opaque handle used for most sa functions. More...
|
Defines |
#define | ATTR_BSWAP(x) BF32_GET(x, 16, 8) |
#define | ATTR_LENGTH(x) BF32_GET(x, 24, 16) |
#define | ATTR_NUM(x) BF32_GET(x, 0, 16) |
#define | ATTR_ENCODE(x, attr, length, bswap) |
#define | TOC_OFF(x) BF32_GET(x, 0, 23) |
#define | TOC_ATTR_PRESENT(x) BF32_GET(x, 31, 1) |
#define | TOC_LEN_IDX(x) BF32_GET(x, 24, 4) |
#define | TOC_ATTR_ENCODE(x, len_idx, offset) |
#define | SA_LAYOUTS "LAYOUTS" |
#define | SA_REGISTRY "REGISTRY" |
#define | SA_MAGIC 0x2F505A |
#define | SA_HDR_LAYOUT_NUM(hdr) BF32_GET(hdr->sa_layout_info, 0, 10) |
#define | SA_HDR_SIZE(hdr) BF32_GET_SB(hdr->sa_layout_info, 10, 6, 3, 0) |
#define | SA_HDR_LAYOUT_INFO_ENCODE(x, num, size) |
#define | SA_GET_DB(hdl, type) (dmu_buf_impl_t *)((type == SA_BONUS) ? hdl->sa_bonus : hdl->sa_spill) |
#define | SA_GET_HDR(hdl, type) |
#define | SA_IDX_TAB_GET(hdl, type) (type == SA_BONUS ? hdl->sa_bonus_tab : hdl->sa_spill_tab) |
#define | IS_SA_BONUSTYPE(a) ((a == DMU_OT_SA) ? B_TRUE : B_FALSE) |
#define | SA_BONUSTYPE_FROM_DB(db) (dmu_get_bonustype((dmu_buf_t *)db)) |
#define | SA_BLKPTR_SPACE (DN_MAX_BONUSLEN - sizeof (blkptr_t)) |
#define | SA_LAYOUT_NUM(x, type) |
#define | SA_REGISTERED_LEN(sa, attr) sa->sa_attr_table[attr].sa_length |
#define | SA_ATTR_LEN(sa, idx, attr, hdr) |
#define | SA_SET_HDR(hdr, num, size) |
#define | SA_ATTR_INFO(sa, idx, hdr, attr, bulk, type, hdl) |
#define | SA_HDR_SIZE_MATCH_LAYOUT(hdr, tb) |
Typedefs |
typedef struct sa_attr_table | sa_attr_table_t |
| Array of known attributes and their various characteristics.
|
typedef struct sa_lot | sa_lot_t |
| Each unique layout will have their own table sa_lot (layout_table)
|
typedef struct sa_idx_tab | sa_idx_tab_t |
| index table of offsets
|
typedef struct sa_hdr_phys | sa_hdr_phys_t |
| header for all bonus and spill buffers.
|
typedef enum sa_buf_type | sa_buf_type_t |
typedef enum sa_data_op | sa_data_op_t |
Enumerations |
enum | sa_buf_type { SA_BONUS = 1,
SA_SPILL = 2
} |
enum | sa_data_op {
SA_LOOKUP,
SA_UPDATE,
SA_ADD,
SA_REPLACE,
SA_REMOVE
} |
Functions |
int | sa_add_impl (sa_handle_t *, sa_attr_type_t, uint32_t, sa_data_locator_t, void *, dmu_tx_t *) |
void | sa_register_update_callback_locked (objset_t *, sa_update_cb_t *) |
int | sa_size_locked (sa_handle_t *, sa_attr_type_t, int *) |
void | sa_default_locator (void **, uint32_t *, uint32_t, boolean_t, void *) |
int | sa_attr_size (sa_os_t *, sa_idx_tab_t *, sa_attr_type_t, uint16_t *, sa_hdr_phys_t *) |
Zap attribute format for attribute registration.
64 56 48 40 32 24 16 8 0
+-------+-------+-------+-------+-------+-------+-------+-------+
| unused | len | bswap | attr num |
+-------+-------+-------+-------+-------+-------+-------+-------+
Zap attribute format for layout information.
layout information is stored as an array of attribute numbers The name of the attribute is the layout number (0, 1, 2, ...)
16 0
+---- ---+
| attr # |
+--------+
| attr # |
+--- ----+
......
Definition in file sa_impl.h.