FreeBSD ZFS
The Zettabyte File System
Defines | Typedefs | Functions | Variables

sa.c File Reference

ZFS System attributes. More...

#include <sys/zfs_context.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysmacros.h>
#include <sys/dmu.h>
#include <sys/dmu_impl.h>
#include <sys/dmu_objset.h>
#include <sys/dbuf.h>
#include <sys/dnode.h>
#include <sys/zap.h>
#include <sys/sa.h>
#include <sys/sunddi.h>
#include <sys/sa_impl.h>
#include <sys/errno.h>
Include dependency graph for sa.c:

Go to the source code of this file.

Defines

#define SA_COPY_DATA(f, s, t, l)
#define SA_ATTR_HASH(attr)   (zfs_crc64_table[(-1ULL ^ attr) & 0xFF])
#define BUF_SPACE_NEEDED(total, header)   (total + header)

Typedefs

typedef void( sa_iterfunc_t )(void *hdr, void *addr, sa_attr_type_t, uint16_t length, int length_idx, boolean_t, void *userp)

Functions

static int sa_build_index (sa_handle_t *hdl, sa_buf_type_t buftype)
static void sa_idx_tab_hold (objset_t *os, sa_idx_tab_t *idx_tab)
static void * sa_find_idx_tab (objset_t *os, dmu_object_type_t bonustype, void *data)
static void sa_idx_tab_rele (objset_t *os, void *arg)
static void sa_copy_data (sa_data_locator_t *func, void *start, void *target, int buflen)
static int sa_modify_attrs (sa_handle_t *hdl, sa_attr_type_t newattr, sa_data_op_t action, sa_data_locator_t *locator, void *datastart, uint16_t buflen, dmu_tx_t *tx)
 Add/remove a single attribute or replace a variable-sized attribute value with a value of a different size, and then rewrite the entire set of attributes.
static int sa_cache_constructor (void *buf, void *unused, int kmflag)
static void sa_cache_destructor (void *buf, void *unused)
void sa_cache_init (void)
void sa_cache_fini (void)
static int layout_num_compare (const void *arg1, const void *arg2)
static int layout_hash_compare (const void *arg1, const void *arg2)
boolean_t sa_layout_equal (sa_lot_t *tbf, sa_attr_type_t *attrs, int count)
static uint64_t sa_layout_info_hash (sa_attr_type_t *attrs, int attr_count)
static int sa_get_spill (sa_handle_t *hdl)
int sa_attr_op (sa_handle_t *hdl, sa_bulk_attr_t *bulk, int count, sa_data_op_t data_op, dmu_tx_t *tx)
 Main attribute lookup/update function.
static sa_lot_tsa_add_layout_entry (objset_t *os, sa_attr_type_t *attrs, int attr_count, uint64_t lot_num, uint64_t hash, boolean_t zapadd, dmu_tx_t *tx)
static void sa_find_layout (objset_t *os, uint64_t hash, sa_attr_type_t *attrs, int count, dmu_tx_t *tx, sa_lot_t **lot)
static int sa_resize_spill (sa_handle_t *hdl, uint32_t size, dmu_tx_t *tx)
static int sa_find_sizes (sa_os_t *sa, sa_bulk_attr_t *attr_desc, int attr_count, dmu_buf_t *db, sa_buf_type_t buftype, int *index, int *total, boolean_t *will_spill)
 Determine several different sizes first the sa header size the number of bytes to be stored if spill would occur the index in the attribute array is returned.
static int sa_build_layouts (sa_handle_t *hdl, sa_bulk_attr_t *attr_desc, int attr_count, dmu_tx_t *tx)
 Find layout that corresponds to ordering of attributes.
static void sa_free_attr_table (sa_os_t *sa)
static int sa_attr_table_setup (objset_t *os, sa_attr_reg_t *reg_attrs, int count)
int sa_setup (objset_t *os, uint64_t sa_obj, sa_attr_reg_t *reg_attrs, int count, sa_attr_type_t **user_table)
void sa_tear_down (objset_t *os)
void sa_build_idx_tab (void *hdr, void *attr_addr, sa_attr_type_t attr, uint16_t length, int length_idx, boolean_t var_length, void *userp)
static void sa_attr_iter (objset_t *os, sa_hdr_phys_t *hdr, dmu_object_type_t type, sa_iterfunc_t func, sa_lot_t *tab, void *userp)
void sa_byteswap_cb (void *hdr, void *attr_addr, sa_attr_type_t attr, uint16_t length, int length_idx, boolean_t variable_length, void *userp)
void sa_byteswap (sa_handle_t *hdl, sa_buf_type_t buftype)
void sa_evict (dmu_buf_t *db, void *sap)
void sa_handle_destroy (sa_handle_t *hdl)
int sa_handle_get_from_db (objset_t *os, dmu_buf_t *db, void *userp, sa_handle_type_t hdl_type, sa_handle_t **handlepp)
int sa_handle_get (objset_t *objset, uint64_t objid, void *userp, sa_handle_type_t hdl_type, sa_handle_t **handlepp)
int sa_buf_hold (objset_t *objset, uint64_t obj_num, void *tag, dmu_buf_t **db)
void sa_buf_rele (dmu_buf_t *db, void *tag)
int sa_lookup_impl (sa_handle_t *hdl, sa_bulk_attr_t *bulk, int count)
int sa_lookup (sa_handle_t *hdl, sa_attr_type_t attr, void *buf, uint32_t buflen)
int sa_lookup_uio (sa_handle_t *hdl, sa_attr_type_t attr, uio_t *uio)
void sa_default_locator (void **dataptr, uint32_t *len, uint32_t total_len, boolean_t start, void *userdata)
static void sa_attr_register_sync (sa_handle_t *hdl, dmu_tx_t *tx)
int sa_replace_all_by_template_locked (sa_handle_t *hdl, sa_bulk_attr_t *attr_desc, int attr_count, dmu_tx_t *tx)
 Replace all attributes with attributes specified in template.
int sa_replace_all_by_template (sa_handle_t *hdl, sa_bulk_attr_t *attr_desc, int attr_count, dmu_tx_t *tx)
static int sa_bulk_update_impl (sa_handle_t *hdl, sa_bulk_attr_t *bulk, int count, dmu_tx_t *tx)
int sa_update (sa_handle_t *hdl, sa_attr_type_t type, void *buf, uint32_t buflen, dmu_tx_t *tx)
 update or add new attribute
int sa_update_from_cb (sa_handle_t *hdl, sa_attr_type_t attr, uint32_t buflen, sa_data_locator_t *locator, void *userdata, dmu_tx_t *tx)
int sa_size (sa_handle_t *hdl, sa_attr_type_t attr, int *size)
 Return size of an attribute.
int sa_bulk_lookup_locked (sa_handle_t *hdl, sa_bulk_attr_t *attrs, int count)
int sa_bulk_lookup (sa_handle_t *hdl, sa_bulk_attr_t *attrs, int count)
int sa_bulk_update (sa_handle_t *hdl, sa_bulk_attr_t *attrs, int count, dmu_tx_t *tx)
int sa_remove (sa_handle_t *hdl, sa_attr_type_t attr, dmu_tx_t *tx)
void sa_object_info (sa_handle_t *hdl, dmu_object_info_t *doi)
void sa_object_size (sa_handle_t *hdl, uint32_t *blksize, u_longlong_t *nblocks)
void sa_update_user (sa_handle_t *newhdl, sa_handle_t *oldhdl)
void sa_set_userp (sa_handle_t *hdl, void *ptr)
dmu_buf_tsa_get_db (sa_handle_t *hdl)
void * sa_get_userdata (sa_handle_t *hdl)
void sa_register_update_callback_locked (objset_t *os, sa_update_cb_t *func)
void sa_register_update_callback (objset_t *os, sa_update_cb_t *func)
uint64_t sa_handle_object (sa_handle_t *hdl)
boolean_t sa_enabled (objset_t *os)
int sa_set_sa_object (objset_t *os, uint64_t sa_object)
int sa_hdrsize (void *arg)
void sa_handle_lock (sa_handle_t *hdl)
void sa_handle_unlock (sa_handle_t *hdl)

Variables

arc_byteswap_func_tsa_bswap_table []
sa_attr_reg_t sa_legacy_attrs []
 List of legacy attributes.
sa_attr_type_t sa_legacy_zpl_layout []
 ZPL legacy layout.
sa_attr_type_t sa_dummy_zpl_layout [] = { 0 }
 Special dummy layout used for buffers with no attributes.
static int sa_legacy_attr_count = 16
static kmem_cache_t * sa_cache = NULL

Detailed Description

ZFS System attributes.

A generic mechanism to allow for arbitrary attributes to be stored in a dnode. The data will be stored in the bonus buffer of the dnode and if necessary a special "spill" block will be used to handle overflow situations. The spill block will be sized to fit the data from 512 - 128K. When a spill block is used the BP (blkptr_t) for the spill block is stored at the end of the current bonus buffer. Any attributes that would be in the way of the blkptr_t will be relocated into the spill block.

Attribute registration

Stored persistently on a per dataset basis a mapping between attribute "string" names and their actual attribute numeric values, length, and byteswap function. The names are only used during registration. All attributes are known by their unique attribute id value. If an attribute can have a variable size then the value 0 will be used to indicate this.

Attribute Layout

Attribute layouts are a way to compactly store multiple attributes, but without taking the overhead associated with managing each attribute individually. Since you will typically have the same set of attributes stored in the same order a single table will be used to represent that layout. The ZPL for example will usually have only about 10 different layouts (regular files, device files, symlinks, regular files + scanstamp, files/dir with extended attributes, and then you have the possibility of all of those minus ACL, because it would be kicked out into the spill block)

Layouts are simply an array of the attributes and their ordering i.e. [0, 1, 4, 5, 2]

Each distinct layout is given a unique layout number and that is whats stored in the header at the beginning of the SA data buffer.

A layout only covers a single dbuf (bonus or spill). If a set of attributes is split up between the bonus buffer and a spill buffer then two different layouts will be used. This allows us to byteswap the spill without looking at the bonus buffer and keeps the on disk format of the bonus and spill buffer the same.

Adding a single attribute will cause the entire set of attributes to be rewritten and could result in a new layout number being constructed as part of the rewrite if no such layout exists for the new set of attribues. The new attribute will be appended to the end of the already existing attributes.

Both the attribute registration and attribute layout information are stored in normal ZAP attributes. Their should be a small number of known layouts and the set of attributes is assumed to typically be quite small.

The registered attributes and layout "table" information is maintained in core and a special "sa_os_t" is attached to the objset_t.

A special interface is provided to allow for quickly applying a large set of attributes at once. sa_replace_all_by_template() is used to set an array of attributes. This is used by the ZPL when creating a brand new file. The template that is passed into the function specifies the attribute, size for variable length attributes, location of data and special "data locator" function if the data isn't in a contiguous location.

Byteswap implications

Since the SA attributes are not entirely self describing we can't do the normal byteswap processing. The special ZAP layout attribute and attribute registration attributes define the byteswap function and the size of the attributes, unless it is variable sized. The normal ZFS byteswapping infrastructure assumes you don't need to read any objects in order to do the necessary byteswapping. Whereas SA attributes can only be properly byteswapped if the dataset is opened and the layout/attribute ZAP attributes are available. Because of this the SA attributes will be byteswapped when they are first accessed by the SA code that will read the SA data.

Definition in file sa.c.


Define Documentation

#define BUF_SPACE_NEEDED (   total,
  header 
)    (total + header)

Definition at line 631 of file sa.c.

#define SA_ATTR_HASH (   attr)    (zfs_crc64_table[(-1ULL ^ attr) & 0xFF])

Definition at line 296 of file sa.c.

#define SA_COPY_DATA (   f,
  s,
  t,
 
)
Value:
{ \
                if (f == NULL) { \
                        if (l == 8) { \
                                *(uint64_t *)t = *(uint64_t *)s; \
                        } else if (l == 16) { \
                                *(uint64_t *)t = *(uint64_t *)s; \
                                *(uint64_t *)((uintptr_t)t + 8) = \
                                    *(uint64_t *)((uintptr_t)s + 8); \
                        } else { \
                                bcopy(s, t, l); \
                        } \
                } else \
                        sa_copy_data(f, s, t, l); \
        }

Definition at line 150 of file sa.c.


Typedef Documentation

typedef void( sa_iterfunc_t)(void *hdr, void *addr, sa_attr_type_t, uint16_t length, int length_idx, boolean_t, void *userp)

Definition at line 128 of file sa.c.


Function Documentation

static int layout_hash_compare ( const void *  arg1,
const void *  arg2 
) [static]

Definition at line 265 of file sa.c.

static int layout_num_compare ( const void *  arg1,
const void *  arg2 
) [static]

Definition at line 252 of file sa.c.

static sa_lot_t* sa_add_layout_entry ( objset_t os,
sa_attr_type_t attrs,
int  attr_count,
uint64_t  lot_num,
uint64_t  hash,
boolean_t  zapadd,
dmu_tx_t tx 
) [static]

Definition at line 415 of file sa.c.

static void sa_attr_iter ( objset_t os,
sa_hdr_phys_t hdr,
dmu_object_type_t  type,
sa_iterfunc_t  func,
sa_lot_t tab,
void *  userp 
) [static]

Definition at line 1154 of file sa.c.

int sa_attr_op ( sa_handle_t hdl,
sa_bulk_attr_t bulk,
int  count,
sa_data_op_t  data_op,
dmu_tx_t tx 
)

Main attribute lookup/update function.

Operates on bulk array, first failure will abort further processing

Returns:
0 for success or non zero for failures

Definition at line 333 of file sa.c.

static void sa_attr_register_sync ( sa_handle_t hdl,
dmu_tx_t tx 
) [static]

Definition at line 1550 of file sa.c.

static int sa_attr_table_setup ( objset_t os,
sa_attr_reg_t reg_attrs,
int  count 
) [static]

Definition at line 821 of file sa.c.

int sa_buf_hold ( objset_t objset,
uint64_t  obj_num,
void *  tag,
dmu_buf_t **  db 
)

Definition at line 1407 of file sa.c.

void sa_buf_rele ( dmu_buf_t db,
void *  tag 
)

Definition at line 1413 of file sa.c.

void sa_build_idx_tab ( void *  hdr,
void *  attr_addr,
sa_attr_type_t  attr,
uint16_t  length,
int  length_idx,
boolean_t  var_length,
void *  userp 
)

Definition at line 1140 of file sa.c.

static int sa_build_index ( sa_handle_t hdl,
sa_buf_type_t  buftype 
) [static]

Definition at line 1255 of file sa.c.

static int sa_build_layouts ( sa_handle_t hdl,
sa_bulk_attr_t attr_desc,
int  attr_count,
dmu_tx_t tx 
) [static]

Find layout that corresponds to ordering of attributes.

If not found a new layout number is created and added to persistent layout tables.

Definition at line 640 of file sa.c.

int sa_bulk_lookup ( sa_handle_t hdl,
sa_bulk_attr_t attrs,
int  count 
)

Definition at line 1851 of file sa.c.

int sa_bulk_lookup_locked ( sa_handle_t hdl,
sa_bulk_attr_t attrs,
int  count 
)

Definition at line 1843 of file sa.c.

int sa_bulk_update ( sa_handle_t hdl,
sa_bulk_attr_t attrs,
int  count,
dmu_tx_t tx 
)

Definition at line 1863 of file sa.c.

static int sa_bulk_update_impl ( sa_handle_t hdl,
sa_bulk_attr_t bulk,
int  count,
dmu_tx_t tx 
) [static]

Definition at line 1755 of file sa.c.

void sa_byteswap ( sa_handle_t hdl,
sa_buf_type_t  buftype 
)

Definition at line 1214 of file sa.c.

void sa_byteswap_cb ( void *  hdr,
void *  attr_addr,
sa_attr_type_t  attr,
uint16_t  length,
int  length_idx,
boolean_t  variable_length,
void *  userp 
)

Definition at line 1204 of file sa.c.

static int sa_cache_constructor ( void *  buf,
void *  unused,
int  kmflag 
) [static]

Definition at line 214 of file sa.c.

static void sa_cache_destructor ( void *  buf,
void *  unused 
) [static]

Definition at line 230 of file sa.c.

void sa_cache_fini ( void  )

Definition at line 245 of file sa.c.

void sa_cache_init ( void  )

Definition at line 237 of file sa.c.

static void sa_copy_data ( sa_data_locator_t func,
void *  start,
void *  target,
int  buflen 
) [static]

Definition at line 522 of file sa.c.

void sa_default_locator ( void **  dataptr,
uint32_t *  len,
uint32_t  total_len,
boolean_t  start,
void *  userdata 
)

Definition at line 1540 of file sa.c.

boolean_t sa_enabled ( objset_t os)

Definition at line 1948 of file sa.c.

void sa_evict ( dmu_buf_t db,
void *  sap 
)

Definition at line 1289 of file sa.c.

void * sa_find_idx_tab ( objset_t os,
dmu_object_type_t  bonustype,
void *  data 
) [static]

Definition at line 1469 of file sa.c.

static void sa_find_layout ( objset_t os,
uint64_t  hash,
sa_attr_type_t attrs,
int  count,
dmu_tx_t tx,
sa_lot_t **  lot 
) [static]

Definition at line 472 of file sa.c.

static int sa_find_sizes ( sa_os_t sa,
sa_bulk_attr_t attr_desc,
int  attr_count,
dmu_buf_t db,
sa_buf_type_t  buftype,
int *  index,
int *  total,
boolean_t *  will_spill 
) [static]

Determine several different sizes first the sa header size the number of bytes to be stored if spill would occur the index in the attribute array is returned.

the boolean will_spill will be set when spilling is necessary. It is only set when the buftype is SA_BONUS

Definition at line 555 of file sa.c.

static void sa_free_attr_table ( sa_os_t sa) [static]

Definition at line 801 of file sa.c.

dmu_buf_t* sa_get_db ( sa_handle_t hdl)

Definition at line 1914 of file sa.c.

static int sa_get_spill ( sa_handle_t hdl) [static]

Definition at line 311 of file sa.c.

void* sa_get_userdata ( sa_handle_t hdl)

Definition at line 1920 of file sa.c.

void sa_handle_destroy ( sa_handle_t hdl)

Definition at line 1328 of file sa.c.

int sa_handle_get ( objset_t objset,
uint64_t  objid,
void *  userp,
sa_handle_type_t  hdl_type,
sa_handle_t **  handlepp 
)

Definition at line 1393 of file sa.c.

int sa_handle_get_from_db ( objset_t os,
dmu_buf_t db,
void *  userp,
sa_handle_type_t  hdl_type,
sa_handle_t **  handlepp 
)

Definition at line 1353 of file sa.c.

void sa_handle_lock ( sa_handle_t hdl)

Definition at line 1975 of file sa.c.

uint64_t sa_handle_object ( sa_handle_t hdl)

Definition at line 1942 of file sa.c.

void sa_handle_unlock ( sa_handle_t hdl)

Definition at line 1982 of file sa.c.

int sa_hdrsize ( void *  arg)

Definition at line 1967 of file sa.c.

static void sa_idx_tab_hold ( objset_t os,
sa_idx_tab_t idx_tab 
) [static]

Definition at line 1319 of file sa.c.

static void sa_idx_tab_rele ( objset_t os,
void *  arg 
) [static]

Definition at line 1295 of file sa.c.

boolean_t sa_layout_equal ( sa_lot_t tbf,
sa_attr_type_t attrs,
int  count 
)

Definition at line 282 of file sa.c.

static uint64_t sa_layout_info_hash ( sa_attr_type_t attrs,
int  attr_count 
) [static]

Definition at line 299 of file sa.c.

int sa_lookup ( sa_handle_t hdl,
sa_attr_type_t  attr,
void *  buf,
uint32_t  buflen 
)

Definition at line 1427 of file sa.c.

int sa_lookup_impl ( sa_handle_t hdl,
sa_bulk_attr_t bulk,
int  count 
)

Definition at line 1419 of file sa.c.

int sa_lookup_uio ( sa_handle_t hdl,
sa_attr_type_t  attr,
uio_t *  uio 
)

Definition at line 1446 of file sa.c.

static int sa_modify_attrs ( sa_handle_t hdl,
sa_attr_type_t  newattr,
sa_data_op_t  action,
sa_data_locator_t locator,
void *  datastart,
uint16_t  buflen,
dmu_tx_t tx 
) [static]

Add/remove a single attribute or replace a variable-sized attribute value with a value of a different size, and then rewrite the entire set of attributes.

Same-length attribute value replacement (including fixed-length attributes) is handled more efficiently by the upper layers.

Definition at line 1623 of file sa.c.

void sa_object_info ( sa_handle_t hdl,
dmu_object_info_t doi 
)

Definition at line 1887 of file sa.c.

void sa_object_size ( sa_handle_t hdl,
uint32_t *  blksize,
u_longlong_t *  nblocks 
)

Definition at line 1893 of file sa.c.

void sa_register_update_callback ( objset_t os,
sa_update_cb_t func 
)

Definition at line 1933 of file sa.c.

void sa_register_update_callback_locked ( objset_t os,
sa_update_cb_t func 
)

Definition at line 1926 of file sa.c.

int sa_remove ( sa_handle_t hdl,
sa_attr_type_t  attr,
dmu_tx_t tx 
)

Definition at line 1875 of file sa.c.

int sa_replace_all_by_template ( sa_handle_t hdl,
sa_bulk_attr_t attr_desc,
int  attr_count,
dmu_tx_t tx 
)

Definition at line 1603 of file sa.c.

int sa_replace_all_by_template_locked ( sa_handle_t hdl,
sa_bulk_attr_t attr_desc,
int  attr_count,
dmu_tx_t tx 
)

Replace all attributes with attributes specified in template.

If dnode had a spill buffer then those attributes will be also be replaced, possibly with just an empty spill block

This interface is intended to only be used for bulk adding of attributes for a new file. It will also be used by the ZPL when converting and old formatted znode to native SA support.

Definition at line 1592 of file sa.c.

static int sa_resize_spill ( sa_handle_t hdl,
uint32_t  size,
dmu_tx_t tx 
) [static]

Definition at line 502 of file sa.c.

int sa_set_sa_object ( objset_t os,
uint64_t  sa_object 
)

Definition at line 1954 of file sa.c.

void sa_set_userp ( sa_handle_t hdl,
void *  ptr 
)

Definition at line 1908 of file sa.c.

int sa_setup ( objset_t os,
uint64_t  sa_obj,
sa_attr_reg_t reg_attrs,
int  count,
sa_attr_type_t **  user_table 
)

Definition at line 981 of file sa.c.

int sa_size ( sa_handle_t hdl,
sa_attr_type_t  attr,
int *  size 
)

Return size of an attribute.

Definition at line 1821 of file sa.c.

void sa_tear_down ( objset_t os)

Definition at line 1104 of file sa.c.

int sa_update ( sa_handle_t hdl,
sa_attr_type_t  type,
void *  buf,
uint32_t  buflen,
dmu_tx_t tx 
)

update or add new attribute

Definition at line 1782 of file sa.c.

int sa_update_from_cb ( sa_handle_t hdl,
sa_attr_type_t  attr,
uint32_t  buflen,
sa_data_locator_t locator,
void *  userdata,
dmu_tx_t tx 
)

Definition at line 1800 of file sa.c.

void sa_update_user ( sa_handle_t newhdl,
sa_handle_t oldhdl 
)

Definition at line 1900 of file sa.c.


Variable Documentation

kmem_cache_t* sa_cache = NULL [static]

Definition at line 210 of file sa.c.

Special dummy layout used for buffers with no attributes.

Definition at line 207 of file sa.c.

int sa_legacy_attr_count = 16 [static]

Definition at line 209 of file sa.c.

Initial value:
 {
        {"ZPL_ATIME", sizeof (uint64_t) * 2, SA_UINT64_ARRAY, 0},
        {"ZPL_MTIME", sizeof (uint64_t) * 2, SA_UINT64_ARRAY, 1},
        {"ZPL_CTIME", sizeof (uint64_t) * 2, SA_UINT64_ARRAY, 2},
        {"ZPL_CRTIME", sizeof (uint64_t) * 2, SA_UINT64_ARRAY, 3},
        {"ZPL_GEN", sizeof (uint64_t), SA_UINT64_ARRAY, 4},
        {"ZPL_MODE", sizeof (uint64_t), SA_UINT64_ARRAY, 5},
        {"ZPL_SIZE", sizeof (uint64_t), SA_UINT64_ARRAY, 6},
        {"ZPL_PARENT", sizeof (uint64_t), SA_UINT64_ARRAY, 7},
        {"ZPL_LINKS", sizeof (uint64_t), SA_UINT64_ARRAY, 8},
        {"ZPL_XATTR", sizeof (uint64_t), SA_UINT64_ARRAY, 9},
        {"ZPL_RDEV", sizeof (uint64_t), SA_UINT64_ARRAY, 10},
        {"ZPL_FLAGS", sizeof (uint64_t), SA_UINT64_ARRAY, 11},
        {"ZPL_UID", sizeof (uint64_t), SA_UINT64_ARRAY, 12},
        {"ZPL_GID", sizeof (uint64_t), SA_UINT64_ARRAY, 13},
        {"ZPL_PAD", sizeof (uint64_t) * 4, SA_UINT64_ARRAY, 14},
        {"ZPL_ZNODE_ACL", 88, SA_UINT8_ARRAY, 15},
}

List of legacy attributes.

This table is fixed and cannot be changed. Its purpose is to allow the SA code to work with both old/new ZPL file systems. It contains the list of legacy attributes. These attributes aren't stored in the "attribute" registry zap objects, since older ZPL file systems won't have the registry. Only objsets of type ZFS_TYPE_FILESYSTEM will use this static table.

Definition at line 176 of file sa.c.

Initial value:
 {
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
}

ZPL legacy layout.

This is only used for objects of type DMU_OT_ZNODE

Definition at line 200 of file sa.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines