Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / obdclass / obd_config.c
index 8e3a854..82ce630 100644 (file)
@@ -439,11 +439,15 @@ int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg)
                                 obd->obd_fail = 1;
                                 obd->obd_no_transno = 1;
                                 obd->obd_no_recov = 1;
-                                /* Set the obd readonly if we can */
-                                if (OBP(obd, iocontrol))
+                                if (OBP(obd, iocontrol)) {
+                                        obd_iocontrol(OBD_IOC_SYNC,
+                                                      obd->obd_self_export,
+                                                      0, NULL, NULL);
+                                 /* Set the obd readonly if we can */
                                         obd_iocontrol(OBD_IOC_SET_READONLY,
                                                       obd->obd_self_export,
                                                       0, NULL, NULL);
+                                }
                                 break;
                         default:
                                 CERROR("unrecognised flag '%c'\n",