Whamcloud - gitweb
LU-10629 lod: Clear OST pool with setstripe
[fs/lustre-release.git] / lustre / target / tgt_lastrcvd.c
index 3a55026..b316781 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2016, Intel Corporation.
+ * Copyright (c) 2011, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -1079,10 +1079,6 @@ int tgt_client_del(const struct lu_env *env, struct obd_export *exp)
                RETURN(-EINVAL);
        }
 
-       /* Do not erase record for recoverable client. */
-       if (exp->exp_obd->obd_fail)
-               RETURN(0);
-
        /* XXX if lcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
        if (!strcmp((char *)ted->ted_lcd->lcd_uuid,
                    (char *)tgt->lut_obd->obd_uuid.uuid) ||
@@ -1109,6 +1105,9 @@ int tgt_client_del(const struct lu_env *env, struct obd_export *exp)
                LBUG();
        }
 
+       /* Do not erase record for recoverable client. */
+       if (exp->exp_flags & OBD_OPT_FAILOVER)
+               RETURN(0);
 
        if (OBD_FAIL_CHECK(OBD_FAIL_TGT_CLIENT_DEL))
                RETURN(0);