Merge branch 'gcc-unused' into refs/top-bases/gcc-branch
This commit is contained in:
commit
74e79d3bf6
|
@ -1742,8 +1742,7 @@ dbuf_create_bonus(dnode_t *dn)
|
|||
void
|
||||
dbuf_add_ref(dmu_buf_impl_t *db, void *tag)
|
||||
{
|
||||
int64_t holds = refcount_add(&db->db_holds, tag);
|
||||
ASSERT(holds > 1);
|
||||
VERIFY(refcount_add(&db->db_holds, tag) > 1);
|
||||
}
|
||||
|
||||
#pragma weak dmu_buf_rele = dbuf_rele
|
||||
|
@ -2332,17 +2331,15 @@ dbuf_write_done(zio_t *zio, arc_buf_t *buf, void *vdb)
|
|||
ASSERT(arc_released(db->db_buf));
|
||||
}
|
||||
} else {
|
||||
dnode_t *dn = db->db_dnode;
|
||||
|
||||
ASSERT(list_head(&dr->dt.di.dr_children) == NULL);
|
||||
ASSERT3U(db->db.db_size, ==, 1<<dn->dn_phys->dn_indblkshift);
|
||||
ASSERT3U(db->db.db_size, ==,
|
||||
1<<db->db_dnode->dn_phys->dn_indblkshift);
|
||||
if (!BP_IS_HOLE(db->db_blkptr)) {
|
||||
int epbs =
|
||||
dn->dn_phys->dn_indblkshift - SPA_BLKPTRSHIFT;
|
||||
ASSERT3U(BP_GET_LSIZE(db->db_blkptr), ==,
|
||||
db->db.db_size);
|
||||
ASSERT3U(dn->dn_phys->dn_maxblkid
|
||||
>> (db->db_level * epbs), >=, db->db_blkid);
|
||||
ASSERT3U(db->db_dnode->dn_phys->dn_maxblkid >> (db->db_level *
|
||||
(db->db_dnode->dn_phys->dn_indblkshift - SPA_BLKPTRSHIFT)),
|
||||
>=, db->db_blkid);
|
||||
arc_set_callback(db->db_buf, dbuf_do_evict, db);
|
||||
}
|
||||
mutex_destroy(&dr->dt.di.dr_mtx);
|
||||
|
|
|
@ -40,7 +40,9 @@ static int free_range_compar(const void *node1, const void *node2);
|
|||
|
||||
static kmem_cache_t *dnode_cache;
|
||||
|
||||
#ifndef NDEBUG
|
||||
static dnode_phys_t dnode_phys_zero;
|
||||
#endif
|
||||
|
||||
int zfs_default_bs = SPA_MINBLOCKSHIFT;
|
||||
int zfs_default_ibs = DN_MAX_INDBLKSHIFT;
|
||||
|
@ -517,11 +519,12 @@ dnode_buf_pageout(dmu_buf_t *db, void *arg)
|
|||
|
||||
for (i = 0; i < epb; i++) {
|
||||
dnode_t *dn = children_dnodes[i];
|
||||
int n;
|
||||
|
||||
if (dn == NULL)
|
||||
continue;
|
||||
#ifdef ZFS_DEBUG
|
||||
{
|
||||
int n;
|
||||
/*
|
||||
* If there are holds on this dnode, then there should
|
||||
* be holds on the dnode's containing dbuf as well; thus
|
||||
|
@ -534,6 +537,7 @@ dnode_buf_pageout(dmu_buf_t *db, void *arg)
|
|||
|
||||
for (n = 0; n < TXG_SIZE; n++)
|
||||
ASSERT(!list_link_active(&dn->dn_dirty_link[n]));
|
||||
}
|
||||
#endif
|
||||
children_dnodes[i] = NULL;
|
||||
dnode_destroy(dn);
|
||||
|
|
|
@ -319,8 +319,10 @@ dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx)
|
|||
ASSERT3U(blkid + nblks, <=, dn->dn_phys->dn_nblkptr);
|
||||
(void) free_blocks(dn, bp + blkid, nblks, tx);
|
||||
if (trunc) {
|
||||
#ifndef NDEBUG
|
||||
uint64_t off = (dn->dn_phys->dn_maxblkid + 1) *
|
||||
(dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT);
|
||||
#endif
|
||||
dn->dn_phys->dn_maxblkid = (blkid ? blkid - 1 : 0);
|
||||
ASSERT(off < dn->dn_phys->dn_maxblkid ||
|
||||
dn->dn_phys->dn_maxblkid == 0 ||
|
||||
|
@ -349,8 +351,10 @@ dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx)
|
|||
dbuf_rele(db, FTAG);
|
||||
}
|
||||
if (trunc) {
|
||||
#ifndef NDEBUG
|
||||
uint64_t off = (dn->dn_phys->dn_maxblkid + 1) *
|
||||
(dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT);
|
||||
#endif
|
||||
dn->dn_phys->dn_maxblkid = (blkid ? blkid - 1 : 0);
|
||||
ASSERT(off < dn->dn_phys->dn_maxblkid ||
|
||||
dn->dn_phys->dn_maxblkid == 0 ||
|
||||
|
|
|
@ -1997,10 +1997,8 @@ dsl_dataset_space(dsl_dataset_t *ds,
|
|||
boolean_t
|
||||
dsl_dataset_modified_since_lastsnap(dsl_dataset_t *ds)
|
||||
{
|
||||
dsl_pool_t *dp = ds->ds_dir->dd_pool;
|
||||
|
||||
ASSERT(RW_LOCK_HELD(&dp->dp_config_rwlock) ||
|
||||
dsl_pool_sync_context(dp));
|
||||
ASSERT(RW_LOCK_HELD(&(ds->ds_dir->dd_pool)->dp_config_rwlock) ||
|
||||
dsl_pool_sync_context(ds->ds_dir->dd_pool));
|
||||
if (ds->ds_prev == NULL)
|
||||
return (B_FALSE);
|
||||
if (ds->ds_phys->ds_bp.blk_birth >
|
||||
|
|
|
@ -48,11 +48,10 @@ static void
|
|||
dsl_dir_evict(dmu_buf_t *db, void *arg)
|
||||
{
|
||||
dsl_dir_t *dd = arg;
|
||||
dsl_pool_t *dp = dd->dd_pool;
|
||||
int t;
|
||||
|
||||
for (t = 0; t < TXG_SIZE; t++) {
|
||||
ASSERT(!txg_list_member(&dp->dp_dirty_dirs, dd, t));
|
||||
ASSERT(!txg_list_member(&dd->dd_pool->dp_dirty_dirs, dd, t));
|
||||
ASSERT(dd->dd_tempreserved[t] == 0);
|
||||
ASSERT(dd->dd_space_towrite[t] == 0);
|
||||
}
|
||||
|
|
|
@ -370,7 +370,7 @@ dsl_prop_set_sync(void *arg1, void *arg2, cred_t *cr, dmu_tx_t *tx)
|
|||
|
||||
if (psa->numints == 0) {
|
||||
int err = zap_remove(mos, zapobj, psa->name, tx);
|
||||
ASSERT(err == 0 || err == ENOENT);
|
||||
VERIFY(0 == err || ENOENT == err);
|
||||
if (isint) {
|
||||
VERIFY(0 == dsl_prop_get_ds(ds,
|
||||
psa->name, 8, 1, &intval, NULL));
|
||||
|
|
|
@ -1414,8 +1414,7 @@ vdev_dtl_sync(vdev_t *vd, uint64_t txg)
|
|||
|
||||
if (vd->vdev_detached) {
|
||||
if (smo->smo_object != 0) {
|
||||
int err = dmu_object_free(mos, smo->smo_object, tx);
|
||||
ASSERT3U(err, ==, 0);
|
||||
VERIFY(0 == dmu_object_free(mos, smo->smo_object, tx));
|
||||
smo->smo_object = 0;
|
||||
}
|
||||
dmu_tx_commit(tx);
|
||||
|
|
|
@ -253,7 +253,6 @@ vdev_cache_read(zio_t *zio)
|
|||
vdev_cache_t *vc = &zio->io_vd->vdev_cache;
|
||||
vdev_cache_entry_t *ve, ve_search;
|
||||
uint64_t cache_offset = P2ALIGN(zio->io_offset, VCBS);
|
||||
uint64_t cache_phase = P2PHASE(zio->io_offset, VCBS);
|
||||
zio_t *fio;
|
||||
|
||||
ASSERT(zio->io_type == ZIO_TYPE_READ);
|
||||
|
@ -270,7 +269,7 @@ vdev_cache_read(zio_t *zio)
|
|||
if (P2BOUNDARY(zio->io_offset, zio->io_size, VCBS))
|
||||
return (EXDEV);
|
||||
|
||||
ASSERT(cache_phase + zio->io_size <= VCBS);
|
||||
ASSERT(P2PHASE(zio->io_offset, VCBS) + zio->io_size <= VCBS);
|
||||
|
||||
mutex_enter(&vc->vc_lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue