Whamcloud - gitweb
LU-1330 fld: prepare FLD module for client server split 75/2675/16
authorLiu Xuezhao <xuezhao.liu@emc.com>
Fri, 15 Mar 2013 00:01:06 +0000 (19:01 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 21 Jun 2013 22:01:02 +0000 (22:01 +0000)
Split FLD server from client, fld_{handler,index}.c are not compliled
unless server support is enabled.  Do not include dt_object.h or
lustre_mdt.h in lustre_fld.h and fix the minor breakages caused by
this elsewhere.  Generally cleanup includes in lustre/fld.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I60a43934f9aa391689e376f68d249b7244645713
Reviewed-on: http://review.whamcloud.com/2675
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
16 files changed:
lustre/fld/Makefile.in
lustre/fld/autoMakefile.am
lustre/fld/fld_cache.c
lustre/fld/fld_handler.c
lustre/fld/fld_index.c
lustre/fld/fld_internal.h
lustre/fld/fld_request.c
lustre/fld/lproc_fld.c
lustre/include/lustre_fld.h
lustre/include/md_object.h
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/mdt/mdt_internal.h
lustre/obdecho/echo_client.c
lustre/osd-zfs/osd_handler.c
lustre/quota/qmt_internal.h

index 2887277..e869668 100644 (file)
@@ -1,6 +1,7 @@
-MODULES := fld 
-fld-objs := fld_handler.o fld_request.o fld_cache.o fld_index.o lproc_fld.o
+MODULES := fld
+fld-objs := fld_request.o fld_cache.o lproc_fld.o
+@SERVER_TRUE@fld-objs += fld_handler.o fld_index.o
 
-EXTRA_PRE_CFLAGS := -I@LUSTRE@ -I@LUSTRE@/ldiskfs
+EXTRA_PRE_CFLAGS := -I@LUSTRE@
 
 @INCLUDE_RULES@
index aaadac6..a8aa63a 100644 (file)
@@ -36,7 +36,7 @@
 
 if LIBLUSTRE
 noinst_LIBRARIES = libfld.a
-libfld_a_SOURCES = fld_handler.c fld_request.c fld_cache.c lproc_fld.c fld_internal.h
+libfld_a_SOURCES = fld_request.c fld_cache.c lproc_fld.c fld_internal.h
 libfld_a_CPPFLAGS = $(LLCPPFLAGS)
 libfld_a_CFLAGS = $(LLCFLAGS)
 endif
@@ -45,5 +45,5 @@ if MODULES
 modulefs_DATA = fld$(KMODEXT)
 endif
 
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
+MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
 EXTRA_DIST := $(fld-objs:%.o=%.c) fld_internal.h
index 632efea..2b6a4e4 100644 (file)
 #ifdef __KERNEL__
 # include <libcfs/libcfs.h>
 # include <linux/module.h>
-# include <linux/jbd.h>
 # include <asm/div64.h>
 #else /* __KERNEL__ */
 # include <liblustre.h>
 # include <libcfs/list.h>
 #endif
 
-#include <obd.h>
-#include <obd_class.h>
-#include <lustre_ver.h>
 #include <obd_support.h>
-#include <lprocfs_status.h>
-
-#include <dt_object.h>
-#include <md_object.h>
-#include <lustre_req_layout.h>
 #include <lustre_fld.h>
 #include "fld_internal.h"
 
@@ -276,9 +267,9 @@ void fld_cache_flush(struct fld_cache *cache)
  * entry accordingly.
  */
 
-void fld_cache_punch_hole(struct fld_cache *cache,
-                          struct fld_cache_entry *f_curr,
-                          struct fld_cache_entry *f_new)
+static void fld_cache_punch_hole(struct fld_cache *cache,
+                                struct fld_cache_entry *f_curr,
+                                struct fld_cache_entry *f_new)
 {
         const struct lu_seq_range *range = &f_new->fce_range;
         const seqno_t new_start  = range->lsr_start;
@@ -499,9 +490,9 @@ void fld_cache_delete(struct fld_cache *cache,
        write_unlock(&cache->fci_lock);
 }
 
-struct fld_cache_entry
-*fld_cache_entry_lookup_nolock(struct fld_cache *cache,
-                             struct lu_seq_range *range)
+struct fld_cache_entry *
+fld_cache_entry_lookup_nolock(struct fld_cache *cache,
+                             const struct lu_seq_range *range)
 {
        struct fld_cache_entry *flde;
        struct fld_cache_entry *got = NULL;
@@ -523,8 +514,9 @@ struct fld_cache_entry
 /**
  * lookup \a seq sequence for range in fld cache.
  */
-struct fld_cache_entry
-*fld_cache_entry_lookup(struct fld_cache *cache, struct lu_seq_range *range)
+struct fld_cache_entry *
+fld_cache_entry_lookup(struct fld_cache *cache,
+                      const struct lu_seq_range *range)
 {
        struct fld_cache_entry *got = NULL;
        ENTRY;
@@ -532,6 +524,7 @@ struct fld_cache_entry
        read_lock(&cache->fci_lock);
        got = fld_cache_entry_lookup_nolock(cache, range);
        read_unlock(&cache->fci_lock);
+
        RETURN(got);
 }
 
@@ -569,4 +562,3 @@ int fld_cache_lookup(struct fld_cache *cache,
        read_unlock(&cache->fci_lock);
        RETURN(-ENOENT);
 }
-
index 84d90ce..9d6d138 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_FLD
 
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/module.h>
-# include <linux/jbd.h>
-# include <asm/div64.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-# include <libcfs/list.h>
-#endif
+#include <libcfs/libcfs.h>
+#include <linux/module.h>
 
 #include <obd.h>
-#include <obd_class.h>
-#include <lustre_ver.h>
 #include <obd_support.h>
-#include <lprocfs_status.h>
-
-#include <md_object.h>
 #include <lustre_fid.h>
+#include <lustre_fld.h>
+#include <lustre_mdt.h> /* err_serious() */
 #include <lustre_req_layout.h>
+#include <lprocfs_status.h>
 #include "fld_internal.h"
-#include <lustre_fid.h>
-
-#ifdef __KERNEL__
 
 /* context key constructor/destructor: fld_key_init, fld_key_fini */
 LU_KEY_INIT_FINI(fld, struct fld_thread_info);
@@ -74,33 +62,20 @@ LU_KEY_INIT_FINI(fld, struct fld_thread_info);
 /* context key: fld_thread_key */
 LU_CONTEXT_KEY_DEFINE(fld, LCT_MD_THREAD | LCT_DT_THREAD | LCT_MG_THREAD);
 
-cfs_proc_dir_entry_t *fld_type_proc_dir = NULL;
-
-static int __init fld_mod_init(void)
+int fld_server_mod_init(void)
 {
-        fld_type_proc_dir = lprocfs_register(LUSTRE_FLD_NAME,
-                                             proc_lustre_root,
-                                             NULL, NULL);
-        if (IS_ERR(fld_type_proc_dir))
-                return PTR_ERR(fld_type_proc_dir);
-
-        LU_CONTEXT_KEY_INIT(&fld_thread_key);
-        lu_context_key_register(&fld_thread_key);
-        return 0;
+       LU_CONTEXT_KEY_INIT(&fld_thread_key);
+       return lu_context_key_register(&fld_thread_key);
 }
 
-static void __exit fld_mod_exit(void)
+void fld_server_mod_exit(void)
 {
-        lu_context_key_degister(&fld_thread_key);
-        if (fld_type_proc_dir != NULL && !IS_ERR(fld_type_proc_dir)) {
-                lprocfs_remove(&fld_type_proc_dir);
-                fld_type_proc_dir = NULL;
-        }
+       lu_context_key_degister(&fld_thread_key);
 }
 
 int fld_declare_server_create(const struct lu_env *env,
                              struct lu_server_fld *fld,
-                             struct lu_seq_range *range,
+                             const struct lu_seq_range *range,
                              struct thandle *th)
 {
        int rc;
@@ -117,7 +92,7 @@ EXPORT_SYMBOL(fld_declare_server_create);
  * is granted to a server.
  */
 int fld_server_create(const struct lu_env *env, struct lu_server_fld *fld,
-                     struct lu_seq_range *range, struct thandle *th)
+                     const struct lu_seq_range *range, struct thandle *th)
 {
        int rc;
 
@@ -445,10 +420,3 @@ void fld_server_fini(const struct lu_env *env, struct lu_server_fld *fld)
        EXIT;
 }
 EXPORT_SYMBOL(fld_server_fini);
-
-MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
-MODULE_DESCRIPTION("Lustre FLD");
-MODULE_LICENSE("GPL");
-
-cfs_module(mdd, "0.1.0", fld_mod_init, fld_mod_exit);
-#endif
index 577d388..c9a3546 100644 (file)
 #ifdef __KERNEL__
 # include <libcfs/libcfs.h>
 # include <linux/module.h>
-# include <linux/jbd.h>
 #else /* __KERNEL__ */
 # include <liblustre.h>
 #endif
 
-#include <obd.h>
-#include <obd_class.h>
-#include <lustre_ver.h>
 #include <obd_support.h>
-#include <lprocfs_status.h>
-
 #include <dt_object.h>
-#include <md_object.h>
-#include <lustre_mdc.h>
 #include <lustre_fid.h>
 #include <lustre_fld.h>
 #include "fld_internal.h"
 
-const char fld_index_name[] = "fld";
+static const char fld_index_name[] = "fld";
 
 static const struct lu_seq_range IGIF_FLD_RANGE = {
        .lsr_start = FID_SEQ_IGIF,
@@ -85,7 +77,7 @@ static const struct lu_seq_range ROOT_FLD_RANGE = {
        .lsr_flags = LU_SEQ_RANGE_MDT
 };
 
-const struct dt_index_features fld_index_features = {
+static const struct dt_index_features fld_index_features = {
        .dif_flags       = DT_IND_UPDATE,
        .dif_keysize_min = sizeof(seqno_t),
        .dif_keysize_max = sizeof(seqno_t),
@@ -138,10 +130,10 @@ int fld_declare_index_create(const struct lu_env *env,
                               fld->lsf_name, PRANGE(range), rc);
                        GOTO(out, rc);
                }
-               memcpy(tmp, new_range, sizeof(*new_range));
+               *tmp = *new_range;
                tmp->lsr_start = range->lsr_start;
        } else {
-               memcpy(tmp, new_range, sizeof(*new_range));
+               *tmp = *new_range;
        }
 
        range_cpu_to_be(tmp, tmp);
@@ -200,11 +192,11 @@ int fld_index_create(const struct lu_env *env, struct lu_server_fld *fld,
                                BYPASS_CAPA);
                if (rc != 0)
                        GOTO(out, rc);
-               memcpy(tmp, new_range, sizeof(*new_range));
+               *tmp = *new_range;
                tmp->lsr_start = range->lsr_start;
                deleted = 1;
        } else {
-               memcpy(tmp, new_range, sizeof(*new_range));
+               *tmp = *new_range;
        }
 
        range_cpu_to_be(tmp, tmp);
index fbb050a..e95ad9f 100644 (file)
 #ifndef __FLD_INTERNAL_H
 #define __FLD_INTERNAL_H
 
+#include <obd.h>
 #include <lustre/lustre_idl.h>
-#include <dt_object.h>
-
 #include <libcfs/libcfs.h>
-#include <lustre_req_layout.h>
 #include <lustre_fld.h>
 
 enum {
@@ -56,7 +54,6 @@ enum {
 struct fld_stats {
         __u64   fst_count;
         __u64   fst_cache;
-        __u64   fst_inflight;
 };
 
 typedef int (*fld_hash_func_t) (struct lu_client_fld *, __u64);
@@ -141,16 +138,23 @@ extern struct lu_fld_hash fld_hash[];
 
 #ifdef __KERNEL__
 
+# ifdef LPROCFS
+extern struct proc_dir_entry *fld_type_proc_dir;
+extern struct lprocfs_vars fld_client_proc_list[];
+# endif
+
+# ifdef HAVE_SERVER_SUPPORT
+struct req_capsule;
 struct fld_thread_info {
-        struct req_capsule *fti_pill;
-        __u64               fti_key;
-        struct lu_seq_range fti_rec;
-        struct lu_seq_range fti_lrange;
-        struct lu_seq_range fti_irange;
+       struct req_capsule *fti_pill;
+       struct lu_seq_range fti_rec;
+       struct lu_seq_range fti_lrange;
+       struct lu_seq_range fti_irange;
 };
 
 extern struct lu_context_key fld_thread_key;
 
+struct dt_device;
 int fld_index_init(const struct lu_env *env, struct lu_server_fld *fld,
                   struct dt_device *dt);
 
@@ -158,24 +162,30 @@ void fld_index_fini(const struct lu_env *env, struct lu_server_fld *fld);
 
 int fld_declare_index_create(const struct lu_env *env,
                             struct lu_server_fld *fld,
-                            const struct lu_seq_range *new,
+                            const struct lu_seq_range *new_range,
                             struct thandle *th);
 
 int fld_index_create(const struct lu_env *env, struct lu_server_fld *fld,
-                    const struct lu_seq_range *new, struct thandle *th);
+                    const struct lu_seq_range *new_range, struct thandle *th);
 
 int fld_index_lookup(const struct lu_env *env, struct lu_server_fld *fld,
                     seqno_t seq, struct lu_seq_range *range);
 
-int fld_client_rpc(struct obd_export *exp,
-                   struct lu_seq_range *range, __u32 fld_op);
+int fld_server_mod_init(void);
 
-#ifdef LPROCFS
+void fld_server_mod_exit(void);
+
+# ifdef LPROCFS
+extern const struct file_operations fld_proc_seq_fops;
 extern struct lprocfs_vars fld_server_proc_list[];
-extern struct lprocfs_vars fld_client_proc_list[];
-#endif
+# endif
 
-#endif
+# endif /* HAVE_SERVER_SUPPORT */
+
+int fld_client_rpc(struct obd_export *exp,
+                  struct lu_seq_range *range, __u32 fld_op);
+
+#endif /* __KERNEL__ */
 
 struct fld_cache *fld_cache_init(const char *name,
                                  int cache_size, int cache_threshold);
@@ -199,27 +209,26 @@ void fld_cache_delete_nolock(struct fld_cache *cache,
 int fld_cache_lookup(struct fld_cache *cache,
                      const seqno_t seq, struct lu_seq_range *range);
 
-struct fld_cache_entry*
-fld_cache_entry_lookup(struct fld_cache *cache, struct lu_seq_range *range);
+struct fld_cache_entry *
+fld_cache_entry_lookup(struct fld_cache *cache,
+                      const struct lu_seq_range *range);
+
 void fld_cache_entry_delete(struct fld_cache *cache,
                            struct fld_cache_entry *node);
-void fld_dump_cache_entries(struct fld_cache *cache);
 
-struct fld_cache_entry
-*fld_cache_entry_lookup_nolock(struct fld_cache *cache,
-                             struct lu_seq_range *range);
-int fld_write_range(const struct lu_env *env, struct dt_object *dt,
-                   const struct lu_seq_range *range, struct thandle *th);
+struct fld_cache_entry *
+fld_cache_entry_lookup_nolock(struct fld_cache *cache,
+                             const struct lu_seq_range *range);
 
 static inline const char *
-fld_target_name(struct lu_fld_target *tar)
+fld_target_name(const struct lu_fld_target *tar)
 {
-        if (tar->ft_srv != NULL)
-                return tar->ft_srv->lsf_name;
+#ifdef HAVE_SERVER_SUPPORT
+       if (tar->ft_srv != NULL)
+               return tar->ft_srv->lsf_name;
+#endif
 
-        return (const char *)tar->ft_exp->exp_obd->obd_name;
+       return tar->ft_exp->exp_obd->obd_name;
 }
 
-extern cfs_proc_dir_entry_t *fld_type_proc_dir;
-extern struct file_operations fld_proc_seq_fops;
 #endif /* __FLD_INTERNAL_H */
index 995581a..d9f2237 100644 (file)
@@ -45,7 +45,6 @@
 #ifdef __KERNEL__
 # include <libcfs/libcfs.h>
 # include <linux/module.h>
-# include <linux/jbd.h>
 # include <asm/div64.h>
 #else /* __KERNEL__ */
 # include <liblustre.h>
 
 #include <obd.h>
 #include <obd_class.h>
-#include <lustre_ver.h>
 #include <obd_support.h>
 #include <lprocfs_status.h>
-
-#include <dt_object.h>
-#include <md_object.h>
 #include <lustre_req_layout.h>
 #include <lustre_fld.h>
 #include <lustre_mdc.h>
@@ -501,22 +496,22 @@ int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
 
        res.lsr_start = seq;
        fld_range_set_type(&res, flags);
-#ifdef __KERNEL__
+
+#if defined(__KERNEL__) && defined(HAVE_SERVER_SUPPORT)
        if (target->ft_srv != NULL) {
                LASSERT(env != NULL);
                rc = fld_server_lookup(env, target->ft_srv, seq, &res);
-       } else {
+       } else
 #endif
+       {
                rc = fld_client_rpc(target->ft_exp, &res, FLD_LOOKUP);
-#ifdef __KERNEL__
        }
-#endif
 
        if (rc == 0) {
                *mds = res.lsr_index;
-
                fld_cache_insert(fld->lcf_cache, &res);
        }
+
        RETURN(rc);
 }
 EXPORT_SYMBOL(fld_client_lookup);
@@ -526,3 +521,41 @@ void fld_client_flush(struct lu_client_fld *fld)
         fld_cache_flush(fld->lcf_cache);
 }
 EXPORT_SYMBOL(fld_client_flush);
+
+#ifdef __KERNEL__
+
+struct proc_dir_entry *fld_type_proc_dir;
+
+static int __init fld_mod_init(void)
+{
+       fld_type_proc_dir = lprocfs_register(LUSTRE_FLD_NAME,
+                                            proc_lustre_root,
+                                            NULL, NULL);
+       if (IS_ERR(fld_type_proc_dir))
+               return PTR_ERR(fld_type_proc_dir);
+
+#ifdef HAVE_SERVER_SUPPORT
+       fld_server_mod_init();
+#endif
+
+       return 0;
+}
+
+static void __exit fld_mod_exit(void)
+{
+#ifdef HAVE_SERVER_SUPPORT
+       fld_server_mod_exit();
+#endif
+
+       if (fld_type_proc_dir != NULL && !IS_ERR(fld_type_proc_dir)) {
+               lprocfs_remove(&fld_type_proc_dir);
+               fld_type_proc_dir = NULL;
+       }
+}
+
+MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
+MODULE_DESCRIPTION("Lustre FLD");
+MODULE_LICENSE("GPL");
+
+cfs_module(mdd, LUSTRE_VERSION_STRING, fld_mod_init, fld_mod_exit);
+#endif /* __KERNEL__ */
index c68f3c4..97bd3d5 100644 (file)
 # include <liblustre.h>
 #endif
 
-#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_fld.h>
 #include <lustre_fid.h>
 #include "fld_internal.h"
@@ -161,6 +157,14 @@ struct fld_seq_param {
        unsigned int            fsp_stop:1;
 };
 
+struct lprocfs_vars fld_client_proc_list[] = {
+       { "targets", fld_proc_read_targets, NULL, NULL },
+       { "hash", fld_proc_read_hash, fld_proc_write_hash, NULL },
+       { "cache_flush", NULL, fld_proc_write_cache_flush, NULL },
+       { NULL }
+};
+
+# ifdef HAVE_SERVER_SUPPORT
 static void *fldb_seq_start(struct seq_file *p, loff_t *pos)
 {
        struct fld_seq_param    *param = p->private;
@@ -350,20 +354,17 @@ static int fldb_seq_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-struct lprocfs_vars fld_server_proc_list[] = {
-       { NULL }};
-
-struct lprocfs_vars fld_client_proc_list[] = {
-       { "targets",     fld_proc_read_targets, NULL, NULL },
-       { "hash",        fld_proc_read_hash, fld_proc_write_hash, NULL },
-       { "cache_flush", NULL, fld_proc_write_cache_flush, NULL },
-       { NULL }};
-
-struct file_operations fld_proc_seq_fops = {
+const struct file_operations fld_proc_seq_fops = {
        .owner   = THIS_MODULE,
        .open    = fldb_seq_open,
        .read    = seq_read,
        .release = fldb_seq_release,
 };
 
-#endif
+struct lprocfs_vars fld_server_proc_list[] = {
+       { NULL }
+};
+
+# endif /* HAVE_SERVER_SUPPORT */
+
+#endif /* LPROCFS */
index c6784c5..e9f35a1 100644 (file)
  */
 
 #include <lustre/lustre_idl.h>
-#include <lustre_mdt.h>
-#include <dt_object.h>
-
 #include <libcfs/libcfs.h>
 
+struct lu_env;
 struct lu_client_fld;
 struct lu_server_fld;
 struct lu_fld_hash;
 struct fld_cache;
-
-extern const struct dt_index_features fld_index_features;
-extern const char fld_index_name[];
+struct thandle;
+struct dt_device;
+struct dt_object;
 
 /*
  * FLD (Fid Location Database) interface.
@@ -64,12 +62,11 @@ enum {
         LUSTRE_CLI_FLD_HASH_RRB
 };
 
-
 struct lu_fld_target {
-        cfs_list_t               ft_chain;
-        struct obd_export       *ft_exp;
-        struct lu_server_fld    *ft_srv;
-        __u64                    ft_idx;
+       cfs_list_t              ft_chain;
+       struct obd_export      *ft_exp;
+       struct lu_server_fld   *ft_srv;
+       __u64                   ft_idx;
 };
 
 struct lu_server_fld {
@@ -129,21 +126,10 @@ struct lu_client_fld {
          * Client fld proc entry name. */
         char                     lcf_name[80];
 
-        const struct lu_context *lcf_ctx;
-
-        int                      lcf_flags;
-};
-
-/**
- * number of blocks to reserve for particular operations. Should be function of
- * ... something. Stub for now.
- */
-enum {
-        /* one insert operation can involve two delete and one insert */
-        FLD_TXN_INDEX_INSERT_CREDITS  = 60,
-        FLD_TXN_INDEX_DELETE_CREDITS  = 20,
+       int                      lcf_flags;
 };
 
+struct com_thread_info;
 int fld_query(struct com_thread_info *info);
 
 /* Server methods */
@@ -155,12 +141,12 @@ void fld_server_fini(const struct lu_env *env, struct lu_server_fld *fld);
 
 int fld_declare_server_create(const struct lu_env *env,
                              struct lu_server_fld *fld,
-                             struct lu_seq_range *new,
+                             const struct lu_seq_range *range,
                              struct thandle *th);
 
 int fld_server_create(const struct lu_env *env,
                      struct lu_server_fld *fld,
-                     struct lu_seq_range *add_range,
+                     const struct lu_seq_range *add_range,
                      struct thandle *th);
 
 int fld_insert_entry(const struct lu_env *env,
index 0f72f8e..4537c7b 100644 (file)
@@ -64,13 +64,6 @@ struct md_object;
 struct obd_export;
 
 enum {
-        UCRED_INVALID   = -1,
-        UCRED_INIT      = 0,
-        UCRED_OLD       = 1,
-        UCRED_NEW       = 2
-};
-
-enum {
         MD_CAPAINFO_MAX = 5
 };
 
@@ -858,6 +851,13 @@ int lustre_buf2som(void *buf, int rc, struct md_som_data *msd);
 int lustre_buf2hsm(void *buf, int rc, struct md_hsm *mh);
 void lustre_hsm2buf(void *buf, struct md_hsm *mh);
 
+enum {
+       UCRED_INVALID   = -1,
+       UCRED_INIT      = 0,
+       UCRED_OLD       = 1,
+       UCRED_NEW       = 2,
+};
+
 struct lu_ucred {
        __u32               uc_valid;
        __u32               uc_o_uid;
index e459c44..5437f71 100644 (file)
@@ -36,6 +36,8 @@
 #include <libcfs/list.h>
 #include <lu_object.h>
 #include <dt_object.h>
+#include <md_object.h>
+#include <lustre_fld.h>
 #include <lustre_lib.h>
 #include <lustre_net.h>
 #include <lustre_lfsck.h>
index 273daee..7516ba5 100644 (file)
@@ -36,6 +36,7 @@
 #include <lustre/lustre_idl.h>
 #include <lu_object.h>
 #include <dt_object.h>
+#include <md_object.h>
 #include <lustre_linkea.h>
 #include <lustre_fid.h>
 #include <lustre_lib.h>
index 446c7c9..0597b6c 100644 (file)
@@ -65,6 +65,7 @@
 #include <md_object.h>
 #include <lustre_fid.h>
 #include <lustre_fld.h>
+#include <lustre_mdt.h>
 #include <lustre_req_layout.h>
 #include <lustre_sec.h>
 #include <lvfs.h>
index 503a8bf..a956f62 100644 (file)
@@ -47,6 +47,7 @@
 #include <lustre_debug.h>
 #include <lprocfs_status.h>
 #include <cl_object.h>
+#include <md_object.h>
 #include <lustre_fid.h>
 #include <lustre_acl.h>
 #include <lustre_net.h>
index ebd5c1b..35bbed0 100644 (file)
@@ -57,6 +57,7 @@
 #include <obd_class.h>
 #include <lustre_disk.h>
 #include <lustre_fid.h>
+#include <md_object.h>
 
 #include "osd_internal.h"
 
index d83ff83..277f4c9 100644 (file)
  * Use is subject to license terms.
  */
 
-#include "lquota_internal.h"
-
 #ifndef _QMT_INTERNAL_H
 #define _QMT_INTERNAL_H
 
+#include <lustre_mdt.h> /* err_serious() */
+#include "lquota_internal.h"
+
 /*
  * The Quota Master Target Device.
  * The qmt is responsible for: