X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fosd-zfs%2Fosd_handler.c;fp=lustre%2Fosd-zfs%2Fosd_handler.c;h=4e23ba181bd7b920839f2e87e26567adf5a759ce;hb=6c6ca1fbfb1b2be0e6a9675f9214f98e59bc8088;hp=078eb344b18adcede4f63aa3190a7991c4fda7cd;hpb=4fed33473ca2964ff19f61fdb8501b2210f923de;p=fs%2Flustre-release.git diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index 078eb34..4e23ba1 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -411,8 +411,8 @@ uint64_t osd_objs_count_estimate(uint64_t usedbytes, uint64_t usedobjs, * gradually disappears as the number of real dnodes grows. It also * avoids the need to check for divide-by-zero computing dn_per_block. */ - CLASSERT(OSD_DNODE_MIN_BLKSHIFT > 0); - CLASSERT(OSD_DNODE_EST_BLKSHIFT > 0); + BUILD_BUG_ON(OSD_DNODE_MIN_BLKSHIFT <= 0); + BUILD_BUG_ON(OSD_DNODE_EST_BLKSHIFT <= 0); est_usedblocks = ((OSD_DNODE_EST_COUNT << OSD_DNODE_EST_BLKSHIFT) + usedbytes) >> est_maxblockshift; @@ -513,7 +513,7 @@ static int osd_objset_statfs(struct osd_device *osd, struct obd_statfs *osfs) * Reserve 0.78% of total space, at least 16MB for small filesystems, * for internal files to be created/unlinked when space is tight. */ - CLASSERT(OSD_STATFS_RESERVED_SIZE > 0); + BUILD_BUG_ON(OSD_STATFS_RESERVED_SIZE <= 0); reserved = OSD_STATFS_RESERVED_SIZE >> bshift; if (likely(osfs->os_blocks >= reserved << OSD_STATFS_RESERVED_SHIFT)) reserved = osfs->os_blocks >> OSD_STATFS_RESERVED_SHIFT; @@ -585,7 +585,7 @@ static int osd_blk_insert_cost(struct osd_device *osd) /* nr_blkptrshift is the log2 of the number of block pointers that can * be stored in an indirect block */ - CLASSERT(DN_MAX_INDBLKSHIFT > SPA_BLKPTRSHIFT); + BUILD_BUG_ON(DN_MAX_INDBLKSHIFT <= SPA_BLKPTRSHIFT); nr_blkptrshift = DN_MAX_INDBLKSHIFT - SPA_BLKPTRSHIFT; /* max_blockshift / nr_blkptrshift is thus the maximum depth of the