MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sa_update

Function sa_update

freebsd/contrib/openzfs/module/zfs/sa.c:2040–2058  ·  view source on GitHub ↗

* update or add new attribute */

Source from the content-addressed store, hash-verified

2038 * update or add new attribute
2039 */
2040int
2041sa_update(sa_handle_t *hdl, sa_attr_type_t type,
2042 void *buf, uint32_t buflen, dmu_tx_t *tx)
2043{
2044 int error;
2045 sa_bulk_attr_t bulk;
2046
2047 VERIFY3U(buflen, <=, SA_ATTR_MAX_LEN);
2048
2049 bulk.sa_attr = type;
2050 bulk.sa_data_func = NULL;
2051 bulk.sa_length = buflen;
2052 bulk.sa_data = buf;
2053
2054 mutex_enter(&hdl->sa_lock);
2055 error = sa_bulk_update_impl(hdl, &bulk, 1, tx);
2056 mutex_exit(&hdl->sa_lock);
2057 return (error);
2058}
2059
2060/*
2061 * Return size of an attribute

Callers 15

zfs_rename_Function · 0.85
zfs_symlinkFunction · 0.85
zfs_inactiveFunction · 0.85
zfs_xvattr_setFunction · 0.85
zfs_extendFunction · 0.85
zfs_unlinked_drainFunction · 0.85
zfs_make_xattrdirFunction · 0.85
zfs_removeFunction · 0.85
zfs_renameFunction · 0.85
zfs_symlinkFunction · 0.85
zfs_inactiveFunction · 0.85
zfs_xvattr_setFunction · 0.85

Calls 3

mutex_enterFunction · 0.85
sa_bulk_update_implFunction · 0.85
mutex_exitFunction · 0.85

Tested by

no test coverage detected