FreeBSD ZFS
The Zettabyte File System
Functions | Variables

zfs_sa.c File Reference

#include <sys/types.h>
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/sa.h>
#include <sys/zfs_acl.h>
#include <sys/zfs_sa.h>
Include dependency graph for zfs_sa.c:

Go to the source code of this file.

Functions

int zfs_sa_readlink (znode_t *zp, uio_t *uio)
void zfs_sa_symlink (znode_t *zp, char *link, int len, dmu_tx_t *tx)
void zfs_sa_get_scanstamp (znode_t *zp, xvattr_t *xvap)
void zfs_sa_set_scanstamp (znode_t *zp, xvattr_t *xvap, dmu_tx_t *tx)
void zfs_sa_upgrade (sa_handle_t *hdl, dmu_tx_t *tx)
 I'm not convinced we should do any of this upgrade.
void zfs_sa_upgrade_txholds (dmu_tx_t *tx, znode_t *zp)

Variables

sa_attr_reg_t zfs_attr_table [ZPL_END+1]
 ZPL attribute registration table.

Function Documentation

void zfs_sa_get_scanstamp ( znode_t zp,
xvattr_t *  xvap 
)

Definition at line 123 of file zfs_sa.c.

int zfs_sa_readlink ( znode_t zp,
uio_t *  uio 
)

Definition at line 72 of file zfs_sa.c.

void zfs_sa_set_scanstamp ( znode_t zp,
xvattr_t *  xvap,
dmu_tx_t tx 
)

Definition at line 157 of file zfs_sa.c.

void zfs_sa_symlink ( znode_t zp,
char *  link,
int  len,
dmu_tx_t tx 
)

Definition at line 96 of file zfs_sa.c.

void zfs_sa_upgrade ( sa_handle_t hdl,
dmu_tx_t tx 
)

I'm not convinced we should do any of this upgrade.

since the SA code can read both old/new znode formats with probably little to no performance difference.

All new files will be created with the new format.

Definition at line 196 of file zfs_sa.c.

void zfs_sa_upgrade_txholds ( dmu_tx_t tx,
znode_t zp 
)

Definition at line 320 of file zfs_sa.c.


Variable Documentation

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},
        {"ZPL_DACL_COUNT", sizeof (uint64_t), SA_UINT64_ARRAY, 0},
        {"ZPL_SYMLINK", 0, SA_UINT8_ARRAY, 0},
        {"ZPL_SCANSTAMP", 32, SA_UINT8_ARRAY, 0},
        {"ZPL_DACL_ACES", 0, SA_ACL, 0},
        {NULL, 0, 0, 0}
}

ZPL attribute registration table.

Order of attributes doesn't matter a unique value will be assigned for each attribute that is file system specific

This is just the set of ZPL attributes that this version of ZFS deals with natively. The file system could have other attributes stored in files, but they will be ignored. The SA framework will preserve them, just that this version of ZFS won't change or delete them.

Definition at line 45 of file zfs_sa.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines