Whamcloud - gitweb
b=17194
[fs/lustre-release.git] / lustre / obdclass / genops.c
index 63f443a..7341aaa 100644 (file)
@@ -1068,7 +1068,8 @@ int class_disconnect(struct obd_export *export)
         RETURN(0);
 }
 
-static void class_disconnect_export_list(struct list_head *list, int flags)
+static void class_disconnect_export_list(struct list_head *list,
+                                         enum obd_option flags)
 {
         int rc;
         struct lustre_handle fake_conn;
@@ -1118,12 +1119,6 @@ static void class_disconnect_export_list(struct list_head *list, int flags)
         EXIT;
 }
 
-static inline int get_exp_flags_from_obd(struct obd_device *obd)
-{
-        return ((obd->obd_fail ? OBD_OPT_FAILOVER : 0) |
-                (obd->obd_force ? OBD_OPT_FORCE : 0));
-}
-
 void class_disconnect_exports(struct obd_device *obd)
 {
         struct list_head work_list;
@@ -1139,7 +1134,7 @@ void class_disconnect_exports(struct obd_device *obd)
                 CDEBUG(D_HA, "OBD device %d (%p) has exports, "
                        "disconnecting them\n", obd->obd_minor, obd);
                 class_disconnect_export_list(&work_list,
-                                             get_exp_flags_from_obd(obd));
+                                             exp_flags_from_obd(obd));
         } else
                 CDEBUG(D_HA, "OBD device %d (%p) has no exports\n",
                        obd->obd_minor, obd);
@@ -1150,7 +1145,8 @@ EXPORT_SYMBOL(class_disconnect_exports);
 /* Remove exports that have not completed recovery.
  */
 int class_disconnect_stale_exports(struct obd_device *obd,
-                                   int (*test_export)(struct obd_export *))
+                                   int (*test_export)(struct obd_export *),
+                                   enum obd_option flags)
 {
         struct list_head work_list;
         struct list_head *pos, *n;
@@ -1182,7 +1178,7 @@ int class_disconnect_stale_exports(struct obd_device *obd,
 
         CDEBUG(D_ERROR, "%s: disconnecting %d stale clients\n",
                obd->obd_name, cnt);
-        class_disconnect_export_list(&work_list, get_exp_flags_from_obd(obd));
+        class_disconnect_export_list(&work_list, flags);
         RETURN(cnt);
 }
 EXPORT_SYMBOL(class_disconnect_stale_exports);