Whamcloud - gitweb
LU-2251 osp: remove invalid assertion
authorJames Simmons <uja.ornl@gmail.com>
Mon, 26 Nov 2012 17:56:51 +0000 (12:56 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 Nov 2012 21:14:33 +0000 (16:14 -0500)
Given we initiate precreation before current pool is exhausted,
we can easly get final number of precreated objects more than
OST_MAX_PRECREATE but it should always be less then the
theortical max of OST_MAX_PRECREATE * 2. If its more than that
then the LASSERT is valid.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ie3ec88c95d94529e457981942e8196b5a6f7d7ae
Reviewed-on: http://review.whamcloud.com/4495
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osp/osp_dev.c

index 58d7824..c86efd8 100644 (file)
@@ -338,7 +338,7 @@ static int osp_statfs(const struct lu_env *env, struct dt_device *dev,
        sfs->os_fprecreated -= d->opd_pre_reserved;
        cfs_spin_unlock(&d->opd_pre_lock);
 
-       LASSERT(sfs->os_fprecreated <= OST_MAX_PRECREATE);
+       LASSERT(sfs->os_fprecreated <= OST_MAX_PRECREATE * 2);
 
        CDEBUG(D_OTHER, "%s: "LPU64" blocks, "LPU64" free, "LPU64" avail, "
               LPU64" files, "LPU64" free files\n", d->opd_obd->obd_name,