#define DEBUG_SUBSYSTEM S_MGS
#define D_MGS D_CONFIG
-#include <lustre_ioctl.h>
+#include <uapi/linux/lustre_ioctl.h>
#include <lustre_swab.h>
#include <lustre/lustre_barrier_user.h>
ENTRY;
if (rc) {
- if (rc == -ENODEV)
+ if (rc == -ENODEV) {
/* The lock is useless, cancel it. */
ldlm_lock_cancel(ca->ca_lock);
+ rc = 0;
+ }
GOTO(out, rc);
}
strnlen(bc->bc_name, sizeof(bc->bc_name)) > 8))
RETURN(-EINVAL);
+ /* NOT allow barrier operations during recovery. */
+ if (unlikely(mgs->mgs_obd->obd_recovering))
+ RETURN(-EBUSY);
+
switch (bc->bc_cmd) {
case BC_FREEZE:
rc = mgs_barrier_freeze(env, mgs, bc);