Whamcloud - gitweb
LU-2070 osp: debug for the issue
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Tue, 2 Oct 2012 05:04:51 +0000 (09:04 +0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 4 Oct 2012 03:33:00 +0000 (23:33 -0400)
OSP to dump objects in the site if the reference > 0

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Id3d5e265a81c94a90f02cf7d4f4895d905ef9fc5
Reviewed-on: http://review.whamcloud.com/4151
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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);