Exemplo n.º 1
0
/*
 * Update the SA and add the object to the dirty list.
 */
int osd_object_sa_update(struct osd_object *obj, sa_attr_type_t type,
			 void *buf, uint32_t buflen, struct osd_thandle *oh)
{
	int rc;

	LASSERT(obj->oo_sa_hdl != NULL);
	LASSERT(oh->ot_tx != NULL);

	rc = -sa_update(obj->oo_sa_hdl, type, buf, buflen, oh->ot_tx);
	osd_object_sa_dirty_add(obj, oh);

	return rc;
}
Exemplo n.º 2
0
/*
 * Bulk update the SA and add the object to the dirty list.
 */
static int
osd_object_sa_bulk_update(struct osd_object *obj, sa_bulk_attr_t *attrs,
			  int count, struct osd_thandle *oh)
{
	int rc;

	LASSERT(obj->oo_sa_hdl != NULL);
	LASSERT(oh->ot_tx != NULL);

	rc = -sa_bulk_update(obj->oo_sa_hdl, attrs, count, oh->ot_tx);
	osd_object_sa_dirty_add(obj, oh);

	return rc;
}
Exemplo n.º 3
0
/*
 * Set an extended attribute.
 * This transaction must have called udmu_xattr_declare_set() first.
 *
 * Returns 0 on success or a negative error number on failure.
 *
 * No locking is done here.
 */
int __osd_sa_xattr_schedule_update(const struct lu_env *env,
				   struct osd_object *obj,
				   struct osd_thandle *oh)
{
	ENTRY;
	LASSERT(obj->oo_sa_hdl);
	LASSERT(obj->oo_sa_xattr);

	/* schedule batched SA update in osd_object_sa_dirty_rele() */
	obj->oo_late_xattr = 1;
	osd_object_sa_dirty_add(obj, oh);

	RETURN(0);

}