Whamcloud - gitweb
b=23728: gss: fix regression of rule removal.
[fs/lustre-release.git] / lustre / mgs / mgs_internal.h
index f62cb29..35534d0 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -61,8 +61,13 @@ struct mgs_tgt_srpc_conf {
 };
 
 #define INDEX_MAP_SIZE  8192     /* covers indicies to FFFF */
-#define FSDB_LOG_EMPTY  0x0001  /* missing client log */
-#define FSDB_OLDLOG14   0x0002  /* log starts in old (1.4) style */
+
+#define FSDB_LOG_EMPTY          (0)  /* missing client log */
+#define FSDB_OLDLOG14           (1)  /* log starts in old (1.4) style */
+#define FSDB_REVOKING_LOCK      (2)  /* DLM lock is being revoked */
+#define FSDB_MGS_SELF           (3)  /* for '_mgs', used by sptlrpc */
+#define FSDB_OSCNAME18          (4)  /* old 1.8 style OSC naming */
+#define FSDB_UDESC              (5)  /* sptlrpc user desc, will be obsolete */
 
 
 struct fs_db {
@@ -71,6 +76,7 @@ struct fs_db {
         cfs_semaphore_t   fsdb_sem;
         void             *fsdb_ost_index_map;  /* bitmap of used indicies */
         void             *fsdb_mdt_index_map;  /* bitmap of used indicies */
+        int               fsdb_mdt_count;
         /* COMPAT_146 these items must be recorded out of the old client log */
         char             *fsdb_clilov;       /* COMPAT_146 client lov name */
         char             *fsdb_clilmv;
@@ -78,15 +84,12 @@ struct fs_db {
         char             *fsdb_mdtlmv;
         char             *fsdb_mdc;          /* COMPAT_146 mdc name */
         /* end COMPAT_146 */
-        __u32             fsdb_flags;
+        unsigned long     fsdb_flags;
         __u32             fsdb_gen;
 
         /* in-memory copy of the srpc rules, guarded by fsdb_sem */
         struct sptlrpc_rule_set   fsdb_srpc_gen;
         struct mgs_tgt_srpc_conf *fsdb_srpc_tgt;
-        unsigned int              fsdb_fl_udesc:1,
-                                  fsdb_fl_mgsself:1,
-                                  fsdb_fl_oscname_18:1;
 };
 
 int mgs_init_fsdb_list(struct obd_device *obd);
@@ -96,8 +99,10 @@ int mgs_find_or_make_fsdb(struct obd_device *obd, char *name,
 int mgs_get_fsdb_srpc_from_llog(struct obd_device *obd, struct fs_db *fsdb);
 int mgs_check_index(struct obd_device *obd, struct mgs_target_info *mti);
 int mgs_check_failnid(struct obd_device *obd, struct mgs_target_info *mti);
-int mgs_write_log_target(struct obd_device *obd, struct mgs_target_info *mti);
-int mgs_upgrade_sv_14(struct obd_device *obd, struct mgs_target_info *mti);
+int mgs_write_log_target(struct obd_device *obd, struct mgs_target_info *mti,
+                         struct fs_db *fsdb);
+int mgs_upgrade_sv_14(struct obd_device *obd, struct mgs_target_info *mti,
+                      struct fs_db *fsdb);
 int mgs_erase_log(struct obd_device *obd, char *name);
 int mgs_erase_logs(struct obd_device *obd, char *fsname);
 int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname);
@@ -105,9 +110,12 @@ int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname);
 int mgs_pool_cmd(struct obd_device *obd, enum lcfg_command_type cmd,
                  char *poolname, char *fsname, char *ostname);
 
+/* mgs_handler.c */
+void mgs_revoke_lock(struct obd_device *obd, struct fs_db *fsdb);
+
 /* mgs_fs.c */
-int mgs_client_add(struct obd_device *obd, struct obd_export *exp,
-                   void *localdata);
+int mgs_export_stats_init(struct obd_device *obd, struct obd_export *exp,
+                          int reconnect, void *localdata);
 int mgs_client_free(struct obd_export *exp);
 int mgs_fs_setup(struct obd_device *obd, struct vfsmount *mnt);
 int mgs_fs_cleanup(struct obd_device *obddev);