Whamcloud - gitweb
LU-3594 lfsck: repair inconsistent owner and multiple referenced cases
[fs/lustre-release.git] / lustre / osp / osp_internal.h
index 383a3d1..2af16c0 100644 (file)
@@ -277,10 +277,8 @@ struct osp_thread_info {
  * no local updates at all */
 static inline bool is_only_remote_trans(struct thandle *th)
 {
-       return th->th_dev->dd_ops == &osp_dt_ops;
+       return th->th_dev != NULL && th->th_dev->dd_ops == &osp_dt_ops;
 }
-/* compat define for lfsck, to be removed soon */
-#define is_remote_trans(a) is_only_remote_trans(a)
 
 static inline void osp_objid_buf_prep(struct lu_buf *buf, loff_t *off,
                                      __u32 *id, int index)
@@ -497,6 +495,21 @@ int osp_object_destroy(const struct lu_env *env, struct dt_object *dt,
 int osp_trans_stop(const struct lu_env *env, struct dt_device *dt,
                   struct thandle *th);
 
+/* osp_md_object.c */
+int osp_md_declare_object_create(const struct lu_env *env,
+                                struct dt_object *dt,
+                                struct lu_attr *attr,
+                                struct dt_allocation_hint *hint,
+                                struct dt_object_format *dof,
+                                struct thandle *th);
+int osp_md_object_create(const struct lu_env *env, struct dt_object *dt,
+                        struct lu_attr *attr, struct dt_allocation_hint *hint,
+                        struct dt_object_format *dof, struct thandle *th);
+int osp_md_declare_attr_set(const struct lu_env *env, struct dt_object *dt,
+                           const struct lu_attr *attr, struct thandle *th);
+int osp_md_attr_set(const struct lu_env *env, struct dt_object *dt,
+                   const struct lu_attr *attr, struct thandle *th,
+                   struct lustre_capa *capa);
 /* osp_precreate.c */
 int osp_init_precreate(struct osp_device *d);
 int osp_precreate_reserve(const struct lu_env *env, struct osp_device *d);