From 34349a1cb8a2156ba37e863e8b220dfc466f0c2e Mon Sep 17 00:00:00 2001 From: tappro Date: Thu, 4 May 2006 19:27:42 +0000 Subject: [PATCH] move object_create/destroy from device_ops to the object_ops --- lustre/include/linux/dt_object.h | 28 ++++++++++++++-------------- lustre/include/linux/md_object.h | 8 ++++---- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lustre/include/linux/dt_object.h b/lustre/include/linux/dt_object.h index 5369592..f596589 100644 --- a/lustre/include/linux/dt_object.h +++ b/lustre/include/linux/dt_object.h @@ -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); }; /* diff --git a/lustre/include/linux/md_object.h b/lustre/include/linux/md_object.h index 141f462..190b270 100644 --- a/lustre/include/linux/md_object.h +++ b/lustre/include/linux/md_object.h @@ -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 { -- 1.8.3.1