Whamcloud - gitweb
LU-1330 fid: prepare FID module for client server split
authorLiu Xuezhao <xuezhao.liu@emc.com>
Wed, 3 Apr 2013 21:47:20 +0000 (16:47 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 11 Jun 2013 16:03:57 +0000 (12:03 -0400)
Split FID server from client, fid_{handler,store,lib}.c are not
compliled unless server support is enabled.  Generally cleanup
includes in lustre/fid/ and reduce the need for client code to
directly or indirectly include {dt,md}_object.h.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie25abffc41922d9f6001b9e38a8e39b387ccf660
Reviewed-on: http://review.whamcloud.com/2673
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
16 files changed:
lustre/fid/Makefile.in
lustre/fid/autoMakefile.am
lustre/fid/fid_handler.c
lustre/fid/fid_internal.h
lustre/fid/fid_lib.c
lustre/fid/fid_request.c
lustre/fid/fid_store.c
lustre/fid/lproc_fid.c
lustre/include/lu_object.h
lustre/include/lustre_fid.h
lustre/include/md_object.h
lustre/include/obd.h
lustre/lod/lod_dev.c
lustre/ofd/ofd_internal.h
lustre/osd-zfs/osd_internal.h
lustre/osp/osp_internal.h

index e4908e5..8b0c6e4 100644 (file)
@@ -1,4 +1,4 @@
 MODULES := fid
-fid-objs := fid_handler.o fid_store.o fid_request.o lproc_fid.o fid_lib.o
-
+fid-objs := fid_request.o lproc_fid.o
+@SERVER_TRUE@fid-objs += fid_handler.o fid_store.o fid_lib.o
 @INCLUDE_RULES@
index cb079c4..9f21c2c 100644 (file)
@@ -36,7 +36,7 @@
 
 if LIBLUSTRE
 noinst_LIBRARIES = libfid.a
-libfid_a_SOURCES = fid_handler.c fid_store.c fid_request.c lproc_fid.c fid_lib.c fid_internal.h
+libfid_a_SOURCES = fid_request.c fid_internal.h
 libfid_a_CPPFLAGS = $(LLCPPFLAGS)
 libfid_a_CFLAGS = $(LLCFLAGS)
 endif
index 262d3d6..efdd33c 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_FID
 
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/module.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
+#include <libcfs/libcfs.h>
+#include <linux/module.h>
 #include <obd.h>
 #include <obd_class.h>
 #include <dt_object.h>
 #include <obd_support.h>
 #include <lustre_req_layout.h>
 #include <lustre_fid.h>
+#include <lustre_mdt.h> /* err_serious() */
 #include "fid_internal.h"
 
-int client_fid_init(struct obd_device *obd,
-                   struct obd_export *exp, enum lu_cli_type type)
-{
-       struct client_obd *cli = &obd->u.cli;
-       char *prefix;
-       int rc;
-       ENTRY;
-
-       OBD_ALLOC_PTR(cli->cl_seq);
-       if (cli->cl_seq == NULL)
-               RETURN(-ENOMEM);
-
-       OBD_ALLOC(prefix, MAX_OBD_NAME + 5);
-       if (prefix == NULL)
-               GOTO(out_free_seq, rc = -ENOMEM);
-
-       snprintf(prefix, MAX_OBD_NAME + 5, "cli-%s", obd->obd_name);
-
-       /* Init client side sequence-manager */
-       rc = seq_client_init(cli->cl_seq, exp, type, prefix, NULL);
-       OBD_FREE(prefix, MAX_OBD_NAME + 5);
-       if (rc)
-               GOTO(out_free_seq, rc);
-
-       RETURN(rc);
-out_free_seq:
-       OBD_FREE_PTR(cli->cl_seq);
-       cli->cl_seq = NULL;
-       return rc;
-}
-EXPORT_SYMBOL(client_fid_init);
-
-int client_fid_fini(struct obd_device *obd)
-{
-       struct client_obd *cli = &obd->u.cli;
-       ENTRY;
-
-       if (cli->cl_seq != NULL) {
-               seq_client_fini(cli->cl_seq);
-               OBD_FREE_PTR(cli->cl_seq);
-               cli->cl_seq = NULL;
-       }
-
-       RETURN(0);
-}
-EXPORT_SYMBOL(client_fid_fini);
-
-#ifdef __KERNEL__
 static void seq_server_proc_fini(struct lu_server_seq *seq);
 
 /* Assigns client to sequence controller node. */
@@ -463,10 +411,10 @@ int seq_query(struct com_thread_info *info)
 }
 EXPORT_SYMBOL(seq_query);
 
-
-#ifdef LPROCFS
 static int seq_server_proc_init(struct lu_server_seq *seq)
 {
+#ifdef LPROCFS
+
         int rc;
         ENTRY;
 
@@ -491,10 +439,14 @@ static int seq_server_proc_init(struct lu_server_seq *seq)
 out_cleanup:
         seq_server_proc_fini(seq);
         return rc;
+#else /* LPROCFS */
+       return 0;
+#endif
 }
 
 static void seq_server_proc_fini(struct lu_server_seq *seq)
 {
+#ifdef LPROCFS
         ENTRY;
         if (seq->lss_proc_dir != NULL) {
                 if (!IS_ERR(seq->lss_proc_dir))
@@ -502,20 +454,9 @@ static void seq_server_proc_fini(struct lu_server_seq *seq)
                 seq->lss_proc_dir = NULL;
         }
         EXIT;
-}
-#else
-static int seq_server_proc_init(struct lu_server_seq *seq)
-{
-        return 0;
+#endif /* LPROCFS */
 }
 
-static void seq_server_proc_fini(struct lu_server_seq *seq)
-{
-        return;
-}
-#endif
-
-
 int seq_server_init(struct lu_server_seq *seq,
                    struct dt_device *dev,
                    const char *prefix,
@@ -635,33 +576,13 @@ int seq_site_fini(const struct lu_env *env, struct seq_server_site *ss)
 }
 EXPORT_SYMBOL(seq_site_fini);
 
-cfs_proc_dir_entry_t *seq_type_proc_dir = NULL;
-
-static int __init fid_mod_init(void)
+int fid_server_mod_init(void)
 {
-        seq_type_proc_dir = lprocfs_register(LUSTRE_SEQ_NAME,
-                                             proc_lustre_root,
-                                             NULL, NULL);
-        if (IS_ERR(seq_type_proc_dir))
-                return PTR_ERR(seq_type_proc_dir);
-
-        LU_CONTEXT_KEY_INIT(&seq_thread_key);
-        lu_context_key_register(&seq_thread_key);
-        return 0;
+       LU_CONTEXT_KEY_INIT(&seq_thread_key);
+       return lu_context_key_register(&seq_thread_key);
 }
 
-static void __exit fid_mod_exit(void)
+void fid_server_mod_exit(void)
 {
-        lu_context_key_degister(&seq_thread_key);
-        if (seq_type_proc_dir != NULL && !IS_ERR(seq_type_proc_dir)) {
-                lprocfs_remove(&seq_type_proc_dir);
-                seq_type_proc_dir = NULL;
-        }
+       lu_context_key_degister(&seq_thread_key);
 }
-
-MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
-MODULE_DESCRIPTION("Lustre FID Module");
-MODULE_LICENSE("GPL");
-
-cfs_module(fid, "0.1.0", fid_mod_init, fid_mod_exit);
-#endif
index 87c5636..e4d3de4 100644 (file)
 #define __FID_INTERNAL_H
 
 #include <lustre/lustre_idl.h>
-#include <dt_object.h>
-
 #include <libcfs/libcfs.h>
 
 #ifdef __KERNEL__
+# ifdef HAVE_SERVER_SUPPORT
+#  define HAVE_SEQ_SERVER
+
+struct req_capsule;
+
 struct seq_thread_info {
         struct req_capsule     *sti_pill;
         struct lu_seq_range     sti_space;
@@ -58,31 +61,42 @@ enum {
 
 extern struct lu_context_key seq_thread_key;
 
-/* Functions used internally in module. */
-int seq_client_alloc_super(struct lu_client_seq *seq,
-                           const struct lu_env *env);
+#  ifdef LPROCFS
+extern struct lprocfs_vars seq_server_proc_list[];
+#  endif
 
 /* Store API functions. */
+struct dt_device;
+
 int seq_store_init(struct lu_server_seq *seq,
-                   const struct lu_env *env,
-                   struct dt_device *dt);
+                  const struct lu_env *env,
+                  struct dt_device *dt);
 
 void seq_store_fini(struct lu_server_seq *seq,
-                    const struct lu_env *env);
+                   const struct lu_env *env);
 
 int seq_store_read(struct lu_server_seq *seq,
-                   const struct lu_env *env);
+                  const struct lu_env *env);
 
 int seq_store_update(const struct lu_env *env, struct lu_server_seq *seq,
-                     struct lu_seq_range *out, int sync);
+                    struct lu_seq_range *out, int sync);
 
-#ifdef LPROCFS
-extern struct lprocfs_vars seq_server_proc_list[];
+int fid_server_mod_init(void);
+
+void fid_server_mod_exit(void);
+
+# endif /* HAVE_SERVER_SUPPORT */
+
+/* Functions used internally in module. */
+int seq_client_alloc_super(struct lu_client_seq *seq,
+                          const struct lu_env *env);
+
+# ifdef LPROCFS
 extern struct lprocfs_vars seq_client_proc_list[];
-#endif
+# endif
 
-#endif
+#endif /* __KERNEL__ */
 
-extern cfs_proc_dir_entry_t *seq_type_proc_dir;
+extern struct proc_dir_entry *seq_type_proc_dir;
 
 #endif /* __FID_INTERNAL_H */
index 77285cc..6764394 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_FID
 
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/module.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#include <obd.h>
-#include <lu_object.h>
+#include <libcfs/libcfs.h>
+#include <linux/module.h>
+#include <lustre/lustre_idl.h>
 #include <lustre_fid.h>
 
 /**
index a929833..d0da85e 100644 (file)
 
 #include <obd.h>
 #include <obd_class.h>
-#include <dt_object.h>
-#include <md_object.h>
 #include <obd_support.h>
-#include <lustre_req_layout.h>
 #include <lustre_fid.h>
 /* mdc RPC locks */
 #include <lustre_mdc.h>
@@ -156,13 +153,15 @@ int seq_client_alloc_super(struct lu_client_seq *seq,
 
        mutex_lock(&seq->lcs_mutex);
 
-#ifdef __KERNEL__
         if (seq->lcs_srv) {
+#ifdef HAVE_SEQ_SERVER
                 LASSERT(env != NULL);
                 rc = seq_server_alloc_super(seq->lcs_srv, &seq->lcs_space,
                                             env);
-        } else {
+#else
+               rc = 0;
 #endif
+       } else {
                /* Check whether the connection to seq controller has been
                 * setup (lcs_exp != NULL) */
                if (seq->lcs_exp == NULL) {
@@ -172,9 +171,7 @@ int seq_client_alloc_super(struct lu_client_seq *seq,
 
                rc = seq_client_rpc(seq, &seq->lcs_space,
                                     SEQ_ALLOC_SUPER, "super");
-#ifdef __KERNEL__
         }
-#endif
        mutex_unlock(&seq->lcs_mutex);
         RETURN(rc);
 }
@@ -186,12 +183,14 @@ static int seq_client_alloc_meta(const struct lu_env *env,
         int rc;
         ENTRY;
 
-#ifdef __KERNEL__
         if (seq->lcs_srv) {
+#ifdef HAVE_SEQ_SERVER
                 LASSERT(env != NULL);
                 rc = seq_server_alloc_meta(seq->lcs_srv, &seq->lcs_space, env);
-        } else {
+#else
+               rc = 0;
 #endif
+       } else {
                do {
                        /* If meta server return -EINPROGRESS or EAGAIN,
                         * it means meta server might not be ready to
@@ -200,9 +199,8 @@ static int seq_client_alloc_meta(const struct lu_env *env,
                        rc = seq_client_rpc(seq, &seq->lcs_space,
                                            SEQ_ALLOC_META, "meta");
                } while (rc == -EINPROGRESS || rc == -EAGAIN);
-#ifdef __KERNEL__
         }
-#endif
+
         RETURN(rc);
 }
 
@@ -421,11 +419,22 @@ void seq_client_flush(struct lu_client_seq *seq)
 }
 EXPORT_SYMBOL(seq_client_flush);
 
-static void seq_client_proc_fini(struct lu_client_seq *seq);
-
+static void seq_client_proc_fini(struct lu_client_seq *seq)
+{
 #ifdef LPROCFS
+       ENTRY;
+       if (seq->lcs_proc_dir) {
+               if (!IS_ERR(seq->lcs_proc_dir))
+                       lprocfs_remove(&seq->lcs_proc_dir);
+               seq->lcs_proc_dir = NULL;
+       }
+       EXIT;
+#endif /* LPROCFS */
+}
+
 static int seq_client_proc_init(struct lu_client_seq *seq)
 {
+#ifdef LPROCFS
         int rc;
         ENTRY;
 
@@ -453,29 +462,11 @@ static int seq_client_proc_init(struct lu_client_seq *seq)
 out_cleanup:
         seq_client_proc_fini(seq);
         return rc;
-}
-
-static void seq_client_proc_fini(struct lu_client_seq *seq)
-{
-        ENTRY;
-        if (seq->lcs_proc_dir) {
-                if (!IS_ERR(seq->lcs_proc_dir))
-                        lprocfs_remove(&seq->lcs_proc_dir);
-                seq->lcs_proc_dir = NULL;
-        }
-        EXIT;
-}
-#else
-static int seq_client_proc_init(struct lu_client_seq *seq)
-{
-        return 0;
-}
 
-static void seq_client_proc_fini(struct lu_client_seq *seq)
-{
-        return;
-}
+#else /* LPROCFS */
+       return 0;
 #endif
+}
 
 int seq_client_init(struct lu_client_seq *seq,
                     struct obd_export *exp,
@@ -532,3 +523,87 @@ void seq_client_fini(struct lu_client_seq *seq)
         EXIT;
 }
 EXPORT_SYMBOL(seq_client_fini);
+
+int client_fid_init(struct obd_device *obd,
+                   struct obd_export *exp, enum lu_cli_type type)
+{
+       struct client_obd *cli = &obd->u.cli;
+       char *prefix;
+       int rc;
+       ENTRY;
+
+       OBD_ALLOC_PTR(cli->cl_seq);
+       if (cli->cl_seq == NULL)
+               RETURN(-ENOMEM);
+
+       OBD_ALLOC(prefix, MAX_OBD_NAME + 5);
+       if (prefix == NULL)
+               GOTO(out_free_seq, rc = -ENOMEM);
+
+       snprintf(prefix, MAX_OBD_NAME + 5, "cli-%s", obd->obd_name);
+
+       /* Init client side sequence-manager */
+       rc = seq_client_init(cli->cl_seq, exp, type, prefix, NULL);
+       OBD_FREE(prefix, MAX_OBD_NAME + 5);
+       if (rc)
+               GOTO(out_free_seq, rc);
+
+       RETURN(rc);
+out_free_seq:
+       OBD_FREE_PTR(cli->cl_seq);
+       cli->cl_seq = NULL;
+       return rc;
+}
+EXPORT_SYMBOL(client_fid_init);
+
+int client_fid_fini(struct obd_device *obd)
+{
+       struct client_obd *cli = &obd->u.cli;
+       ENTRY;
+
+       if (cli->cl_seq != NULL) {
+               seq_client_fini(cli->cl_seq);
+               OBD_FREE_PTR(cli->cl_seq);
+               cli->cl_seq = NULL;
+       }
+
+       RETURN(0);
+}
+EXPORT_SYMBOL(client_fid_fini);
+
+#ifdef __KERNEL__
+struct proc_dir_entry *seq_type_proc_dir;
+
+static int __init fid_mod_init(void)
+{
+       seq_type_proc_dir = lprocfs_register(LUSTRE_SEQ_NAME,
+                                            proc_lustre_root,
+                                            NULL, NULL);
+       if (IS_ERR(seq_type_proc_dir))
+               return PTR_ERR(seq_type_proc_dir);
+
+# ifdef HAVE_SERVER_SUPPORT
+       fid_server_mod_init();
+# endif
+
+       return 0;
+}
+
+static void __exit fid_mod_exit(void)
+{
+# ifdef HAVE_SERVER_SUPPORT
+       fid_server_mod_exit();
+# endif
+
+       if (seq_type_proc_dir != NULL && !IS_ERR(seq_type_proc_dir)) {
+               lprocfs_remove(&seq_type_proc_dir);
+               seq_type_proc_dir = NULL;
+       }
+}
+
+MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
+MODULE_DESCRIPTION("Lustre FID Module");
+MODULE_LICENSE("GPL");
+
+cfs_module(fid, "0.1.0", fid_mod_init, fid_mod_exit);
+#endif /* __KERNEL__ */
index 0ba88b8..5ae8307 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_FID
 
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/module.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#include <obd.h>
-#include <obd_class.h>
+#include <libcfs/libcfs.h>
 #include <dt_object.h>
 #include <md_object.h>
 #include <obd_support.h>
-#include <lustre_req_layout.h>
+#include <lustre_capa.h>
 #include <lustre_fid.h>
+#include <lustre_fld.h>
 #include "fid_internal.h"
 
-#ifdef __KERNEL__
-
 static struct lu_buf *seq_store_buf(struct seq_thread_info *info)
 {
         struct lu_buf *buf;
@@ -262,4 +253,3 @@ void seq_store_fini(struct lu_server_seq *seq,
 
         EXIT;
 }
-#endif
index 7040c49..67cf63c 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_FID
 
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/module.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
+#include <libcfs/libcfs.h>
+#include <linux/module.h>
 #include <obd.h>
 #include <obd_class.h>
-#include <dt_object.h>
-#include <md_object.h>
 #include <obd_support.h>
-#include <lustre_req_layout.h>
 #include <lustre_fid.h>
+#include <lprocfs_status.h>
 #include "fid_internal.h"
 
 #ifdef LPROCFS
@@ -97,6 +90,7 @@ seq_proc_read_common(char *page, char **start, off_t off,
        RETURN(rc);
 }
 
+#ifdef HAVE_SERVER_SUPPORT
 /*
  * Server side procfs stuff.
  */
@@ -214,6 +208,17 @@ seq_server_proc_read_width(char *page, char **start, off_t off,
        RETURN(rc);
 }
 
+struct lprocfs_vars seq_server_proc_list[] = {
+       { "space",
+         seq_server_proc_read_space, seq_server_proc_write_space, NULL },
+       { "width",
+         seq_server_proc_read_width, seq_server_proc_write_width, NULL },
+       { "server",
+         seq_server_proc_read_server, NULL, NULL },
+       { NULL }
+};
+#endif /* HAVE_SERVER_SUPPORT */
+
 /* Client side procfs stuff */
 static int
 seq_client_proc_write_space(struct file *file, const char *buffer,
@@ -349,12 +354,6 @@ seq_client_proc_read_server(char *page, char **start, off_t off,
        RETURN(rc);
 }
 
-struct lprocfs_vars seq_server_proc_list[] = {
-       { "space",    seq_server_proc_read_space, seq_server_proc_write_space, NULL },
-       { "width",    seq_server_proc_read_width, seq_server_proc_write_width, NULL },
-       { "server",   seq_server_proc_read_server, NULL, NULL },
-       { NULL }};
-
 struct lprocfs_vars seq_client_proc_list[] = {
        { "space",    seq_client_proc_read_space, seq_client_proc_write_space, NULL },
        { "width",    seq_client_proc_read_width, seq_client_proc_write_width, NULL },
index 553022d..c093d31 100644 (file)
@@ -665,6 +665,11 @@ lu_site_bkt_from_fid(struct lu_site *site, struct lu_fid *fid)
         return cfs_hash_bd_extra_get(site->ls_obj_hash, &bd);
 }
 
+static inline struct seq_server_site *lu_site2seq(const struct lu_site *s)
+{
+       return s->ld_seq_site;
+}
+
 /** \name ctors
  * Constructors/destructors.
  * @{
index a048bdb..26bc9c3 100644 (file)
@@ -38,8 +38,8 @@
  * Author: Yury Umanets <umka@clusterfs.com>
  */
 
-#ifndef __LINUX_FID_H
-#define __LINUX_FID_H
+#ifndef __LUSTRE_FID_H
+#define __LUSTRE_FID_H
 
 /** \defgroup fid fid
  *
 
 #include <libcfs/libcfs.h>
 #include <lustre/lustre_idl.h>
-#include <lustre_req_layout.h>
-#include <lustre_mdt.h>
-#include <obd.h>
-
 
+struct lu_env;
 struct lu_site;
 struct lu_context;
+struct obd_device;
+struct obd_export;
 
 /* Whole sequences space range and zero range definitions */
 extern const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE;
@@ -320,6 +319,12 @@ static inline void lu_last_id_fid(struct lu_fid *fid, __u64 seq)
        fid->f_ver = 0;
 }
 
+/* seq client type */
+enum lu_cli_type {
+       LUSTRE_SEQ_METADATA = 1,
+       LUSTRE_SEQ_DATA
+};
+
 enum lu_mgr_type {
         LUSTRE_SEQ_SERVER,
         LUSTRE_SEQ_CONTROLLER
@@ -426,10 +431,14 @@ struct lu_server_seq {
        struct seq_server_site  *lss_site;
 };
 
+struct com_thread_info;
 int seq_query(struct com_thread_info *info);
+
+struct ptlrpc_request;
 int seq_handle(struct ptlrpc_request *req);
 
 /* Server methods */
+
 int seq_server_init(struct lu_server_seq *seq,
                    struct dt_device *dev,
                    const char *prefix,
@@ -472,6 +481,7 @@ int seq_site_fini(const struct lu_env *env, struct seq_server_site *ss);
 int fid_is_local(const struct lu_env *env,
                  struct lu_site *site, const struct lu_fid *fid);
 
+enum lu_cli_type;
 int client_fid_init(struct obd_device *obd, struct obd_export *exp,
                    enum lu_cli_type type);
 int client_fid_fini(struct obd_device *obd);
@@ -760,4 +770,4 @@ static inline void range_be_to_cpu(struct lu_seq_range *dst, const struct lu_seq
 
 /** @} fid */
 
-#endif /* __LINUX_FID_H */
+#endif /* __LUSTRE_FID_H */
index e10e45b..0f72f8e 100644 (file)
@@ -503,11 +503,6 @@ static inline struct md_device *md_obj2dev(const struct md_object *o)
         return container_of0(o->mo_lu.lo_dev, struct md_device, md_lu_dev);
 }
 
-static inline struct seq_server_site *lu_site2seq(const struct lu_site *s)
-{
-       return s->ld_seq_site;
-}
-
 static inline int md_device_init(struct md_device *md, struct lu_device_type *t)
 {
         return lu_device_init(&md->md_lu_dev, t);
index b208efd..7e866e9 100644 (file)
@@ -63,6 +63,7 @@
 #include <lu_ref.h>
 #include <lustre_lib.h>
 #include <lustre_export.h>
+#include <lustre_fid.h>
 #include <lustre_fld.h>
 #include <lustre_capa.h>
 
@@ -1254,12 +1255,6 @@ typedef int (* md_enqueue_cb_t)(struct ptlrpc_request *req,
                                 struct md_enqueue_info *minfo,
                                 int rc);
 
-/* seq client type */
-enum lu_cli_type {
-       LUSTRE_SEQ_METADATA = 1,
-       LUSTRE_SEQ_DATA
-};
-
 struct md_enqueue_info {
         struct md_op_data       mi_data;
         struct lookup_intent    mi_it;
index f766fba..99791c5 100644 (file)
@@ -44,6 +44,7 @@
 #define DEBUG_SUBSYSTEM S_MDS
 
 #include <obd_class.h>
+#include <md_object.h>
 #include <lustre_fid.h>
 #include <lustre_param.h>
 #include <lustre_update.h>
index 9ae635b..f653b49 100644 (file)
@@ -40,6 +40,7 @@
 #include <obd.h>
 #include <obd_class.h>
 #include <dt_object.h>
+#include <md_object.h>
 #include <lustre_fid.h>
 #include <obd_ost.h>
 #include <lustre_capa.h>
index c3730a2..15f488c 100644 (file)
@@ -47,6 +47,7 @@
 #define _OSD_INTERNAL_H
 
 #include <dt_object.h>
+#include <md_object.h>
 #include <lustre_quota.h>
 #include <sys/arc.h>
 
index 1658e58..953987f 100644 (file)
@@ -44,6 +44,7 @@
 #include <obd.h>
 #include <obd_class.h>
 #include <dt_object.h>
+#include <md_object.h>
 #include <lustre_fid.h>
 
 /*