Whamcloud - gitweb
LU-8592 mdt: hold mdt_device::mdt_md_root until service stop
[fs/lustre-release.git] / lustre / mdt / mdt_handler.c
index 25a42a7..c3e8cf1 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -4513,11 +4509,6 @@ static void mdt_fini(const struct lu_env *env, struct mdt_device *m)
        struct lfsck_stop        stop;
        ENTRY;
 
-       if (m->mdt_md_root != NULL) {
-               mdt_object_put(env, m->mdt_md_root);
-               m->mdt_md_root = NULL;
-       }
-
        stop.ls_status = LS_PAUSED;
        stop.ls_flags = 0;
        next->md_ops->mdo_iocontrol(env, next, OBD_IOC_STOP_LFSCK, 0, &stop);
@@ -4552,6 +4543,11 @@ static void mdt_fini(const struct lu_env *env, struct mdt_device *m)
                d->ld_obd->obd_namespace = m->mdt_namespace = NULL;
        }
 
+       if (m->mdt_md_root != NULL) {
+               mdt_object_put(env, m->mdt_md_root);
+               m->mdt_md_root = NULL;
+       }
+
        mdt_quota_fini(env, m);
 
        cfs_free_nidlist(&m->mdt_squash.rsi_nosquash_nids);
@@ -5726,7 +5722,7 @@ static int mdt_fid2path(struct mdt_thread_info *info,
                RETURN(-EINVAL);
 
        if (!fid_is_namespace_visible(&fp->gf_fid)) {
-               CDEBUG(D_INFO, "%s: "DFID" is invalid, f_seq should be >= "LPX64
+               CDEBUG(D_INFO, "%s: "DFID" is invalid, f_seq should be >= %#llx"
                       ", or f_oid != 0, or f_ver == 0\n", mdt_obd_name(mdt),
                       PFID(&fp->gf_fid), (__u64)FID_SEQ_NORMAL);
                RETURN(-EINVAL);