+/**
+ * Implement OSP layer dt_object_operations::do_declare_xattr_del() interface.
+ *
+ * Declare that the caller will delete extended attribute on the specified
+ * MDT/OST object.
+ *
+ * This function will add an OUT_XATTR_DEL sub-request to the per
+ * OSP-transaction based request queue which will be flushed when
+ * transaction start.
+ *
+ * \param[in] env pointer to the thread context
+ * \param[in] dt pointer to the OSP layer dt_object
+ * \param[in] name the name of the extended attribute to be set
+ * \param[in] th pointer to the transaction handler
+ *
+ * \retval 0 for success
+ * \retval negative error number on failure
+ */
+int osp_declare_xattr_del(const struct lu_env *env, struct dt_object *dt,
+ const char *name, struct thandle *th)
+{
+ int rc = 0;
+
+ /* Please check the comment in osp_attr_set() for handling
+ * remote transaction. */
+ if (!is_only_remote_trans(th))
+ rc = __osp_xattr_del(env, dt, name, th);
+
+ return rc;
+}
+
+/**
+ * Implement OSP layer dt_object_operations::do_xattr_del() interface.
+ *
+ * Delete extended attribute on the specified MDT/OST object.
+ *
+ * The real modification sub-request has been added in the declare phase
+ * and related (OUT) RPC has been triggered when transaction start.
+ *
+ * If the name extended attribute entry exists in the OSP attributes
+ * cache, then remove it from the cache.
+ *
+ * \param[in] env pointer to the thread context
+ * \param[in] dt pointer to the OSP layer dt_object
+ * \param[in] name the name of the extended attribute to be set
+ * \param[in] th pointer to the transaction handler
+ * \param[in] capa the capability for this operation
+ *
+ * \retval 0 for success
+ * \retval negative error number on failure
+ */
+int osp_xattr_del(const struct lu_env *env, struct dt_object *dt,
+ const char *name, struct thandle *th,
+ struct lustre_capa *capa)
+{
+ int rc = 0;
+
+ CDEBUG(D_INFO, "xattr %s del object "DFID"\n", name,
+ PFID(&dt->do_lu.lo_header->loh_fid));
+
+ /* Please check the comment in osp_attr_set() for handling
+ * remote transaction. */
+ if (is_only_remote_trans(th))
+ rc = __osp_xattr_del(env, dt, name, th);
+
+ return rc;
+}
+
+/**
+ * Implement OSP layer dt_object_operations::do_declare_create() interface.
+ *
+ * Declare that the caller will create the OST object.
+ *
+ * If the transaction is a remote transaction (please refer to the
+ * comment of osp_trans_create() for remote transaction), then the FID
+ * for the OST object has been assigned already, and will be handled
+ * as create (remote) MDT object via osp_md_declare_object_create().
+ * This function is usually used for LFSCK to re-create the lost OST
+ * object. Otherwise, if it is not replay case, the OSP will reserve
+ * pre-created object for the subsequent create operation; if the MDT
+ * side cached pre-created objects are less than some threshold, then
+ * it will wakeup the pre-create thread.
+ *
+ * \param[in] env pointer to the thread context
+ * \param[in] dt pointer to the OSP layer dt_object
+ * \param[in] attr the attribute for the object to be created
+ * \param[in] hint pointer to the hint for creating the object, such as
+ * the parent object
+ * \param[in] dof pointer to the dt_object_format for help the creation
+ * \param[in] th pointer to the transaction handler
+ *
+ * \retval 0 for success
+ * \retval negative error number on failure
+ */