Whamcloud - gitweb
LU-8809 osp: print more opd_pre information in LASSERTF() 42/23642/2
authorEmoly Liu <emoly.liu@intel.com>
Tue, 8 Nov 2016 01:44:07 +0000 (09:44 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Dec 2016 05:43:06 +0000 (05:43 +0000)
This patch is to print out the opd_pre_last_created_fid and
opd_pre_used_fid values in the LASSERT() from osp_statfs(),
so that we know what kind of values they contain.

Test-Parameters: trivial
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I9f525aa46fc0078d241b04767f5a2cebebeaf6b9
Reviewed-on: https://review.whamcloud.com/23642
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/osp/osp_dev.c

index 4937867..aeaae93 100644 (file)
@@ -748,10 +748,12 @@ static int osp_statfs(const struct lu_env *env, struct dt_device *dev,
        sfs->os_fprecreated = fid_oid(&d->opd_pre_last_created_fid) -
                              fid_oid(&d->opd_pre_used_fid);
        sfs->os_fprecreated -= d->opd_pre_reserved;
+       LASSERTF(sfs->os_fprecreated <= OST_MAX_PRECREATE * 2,
+                "last_created "DFID", next_fid "DFID", reserved %llu\n",
+                PFID(&d->opd_pre_last_created_fid), PFID(&d->opd_pre_used_fid),
+                d->opd_pre_reserved);
        spin_unlock(&d->opd_pre_lock);
 
-       LASSERT(sfs->os_fprecreated <= OST_MAX_PRECREATE * 2);
-
        CDEBUG(D_OTHER, "%s: %llu blocks, %llu free, %llu avail, "
               "%llu files, %llu free files\n", d->opd_obd->obd_name,
               sfs->os_blocks, sfs->os_bfree, sfs->os_bavail,