Whamcloud - gitweb
move object_create/destroy from device_ops to the object_ops
authortappro <tappro>
Thu, 4 May 2006 19:27:42 +0000 (19:27 +0000)
committertappro <tappro>
Thu, 4 May 2006 19:27:42 +0000 (19:27 +0000)
lustre/include/linux/dt_object.h
lustre/include/linux/md_object.h

index 5369592..f596589 100644 (file)
@@ -93,20 +93,6 @@ struct dt_device_operations {
          */
         int   (*dt_root_get)(struct lu_context *ctx,
                              struct dt_device *dev, struct lu_fid *f);
-        /*
-         * Create new object on this device.
-         *
-         * postcondition: ergo(result == 0, lu_object_exists(ctxt, &dt->do_lu));
-         */
-        int   (*dt_object_create)(struct lu_context *ctxt, struct dt_object *dt,
-                                  struct thandle *th);
-        /*
-         * Destroy existing object.
-         *
-         * precondition: lu_object_exists(ctxt, &dt->do_lu);
-         */
-        int   (*dt_object_destroy)(struct lu_context *ctxt,
-                                   struct dt_object *dt, struct thandle *th);
 };
 
 /*
@@ -156,6 +142,20 @@ struct dt_object_operations {
         int   (*do_xattr_set)(struct lu_context *ctxt, struct dt_object *dt,
                               void *buf, int buf_len, const char *name,
                               struct thandle *handle);
+        /*
+         * Create new object on this device.
+         *
+         * postcondition: ergo(result == 0, lu_object_exists(ctxt, &dt->do_lu));
+         */
+        int   (*do_object_create)(struct lu_context *ctxt, struct dt_object *dt,
+                                  struct thandle *th);
+        /*
+         * Destroy existing object.
+         *
+         * precondition: lu_object_exists(ctxt, &dt->do_lu);
+         */
+        int   (*do_object_destroy)(struct lu_context *ctxt,
+                                   struct dt_object *dt, struct thandle *th);
 };
 
 /*
index 141f462..190b270 100644 (file)
@@ -59,6 +59,10 @@ struct md_object_operations {
 
         int (*moo_xattr_set)(struct lu_context *ctxt, struct md_object *obj,
                              void *buf, int buf_len, const char *name);
+        /* part of cross-ref operation */
+        int (*moo_object_create)(struct lu_context *, struct md_object *);
+        int (*moo_object_destroy)(struct lu_context *, struct md_object *);
+
 };
 
 /*
@@ -98,10 +102,6 @@ struct md_device_operations {
         int (*mdo_statfs)(struct lu_context *ctx,
                           struct md_device *m, struct kstatfs *sfs);
         
-        /* part of cross-ref operation */
-        int (*mdo_object_create)(struct lu_context *, struct md_object *);
-        int (*mdo_object_destroy)(struct lu_context *, struct md_object *);
-
 };
 
 struct md_device {