Whamcloud - gitweb
LU-2070 osp: debug for the issue
[fs/lustre-release.git] / lustre / osp / osp_dev.c
index cf9ee4f..78d4943 100644 (file)
@@ -584,6 +584,10 @@ static struct lu_device *osp_device_free(const struct lu_env *env,
 
        ENTRY;
 
+       if (cfs_atomic_read(&lu->ld_ref) && lu->ld_site) {
+               LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, D_ERROR, NULL);
+               lu_site_print(env, lu->ld_site, &msgdata, lu_cdebug_printer);
+       }
        dt_device_fini(&m->opd_dt_dev);
        OBD_FREE_PTR(m);
        RETURN(NULL);