Whamcloud - gitweb
LU-8837 lustre: make uapi...lustre_disk.h unnecessary on client
[fs/lustre-release.git] / lustre / mgc / mgc_internal.h
index 3657c86..8429a32 100644 (file)
@@ -43,6 +43,14 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data);
 
 int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld);
 
+/* this timeout represents how many seconds MGC should wait before
+ * requeue config and recover lock to the MGS. We need to randomize this
+ * in order to not flood the MGS.
+ */
+#define MGC_TIMEOUT_MIN_SECONDS                5
+
+extern unsigned int mgc_requeue_timeout_min;
+
 static inline bool cld_is_sptlrpc(struct config_llog_data *cld)
 {
        return cld->cld_type == MGS_CFG_T_SPTLRPC;
@@ -55,12 +63,20 @@ static inline bool cld_is_recover(struct config_llog_data *cld)
 
 static inline bool cld_is_nodemap(struct config_llog_data *cld)
 {
+#ifdef HAVE_SERVER_SUPPORT
        return cld->cld_type == MGS_CFG_T_NODEMAP;
+#else
+       return false;
+#endif
 }
 
 static inline bool cld_is_barrier(struct config_llog_data *cld)
 {
+#ifdef HAVE_SERVER_SUPPORT
        return cld->cld_type == MGS_CFG_T_BARRIER;
+#else
+       return false;
+#endif
 }
 
 #endif  /* _MGC_INTERNAL_H */