Merge commit 'refs/top-bases/zfs-branch' into zfs-branch
This commit is contained in:
commit
e625efa701
|
@ -1854,9 +1854,8 @@ arc_shrink(void)
|
||||||
static int
|
static int
|
||||||
arc_reclaim_needed(void)
|
arc_reclaim_needed(void)
|
||||||
{
|
{
|
||||||
uint64_t extra;
|
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
|
uint64_t extra;
|
||||||
|
|
||||||
if (needfree)
|
if (needfree)
|
||||||
return (1);
|
return (1);
|
||||||
|
@ -2515,7 +2514,7 @@ arc_read(zio_t *pio, spa_t *spa, blkptr_t *bp, arc_buf_t *pbuf,
|
||||||
err = arc_read_nolock(pio, spa, bp, done, private, priority,
|
err = arc_read_nolock(pio, spa, bp, done, private, priority,
|
||||||
zio_flags, arc_flags, zb);
|
zio_flags, arc_flags, zb);
|
||||||
|
|
||||||
ASSERT3P(hdr, ==, pbuf->b_hdr);
|
VERIFY3P(hdr, ==, pbuf->b_hdr);
|
||||||
rw_exit(&pbuf->b_lock);
|
rw_exit(&pbuf->b_lock);
|
||||||
return (err);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,12 +323,12 @@ dbuf_verify(dmu_buf_impl_t *db)
|
||||||
* dnode_set_blksz().
|
* dnode_set_blksz().
|
||||||
*/
|
*/
|
||||||
if (db->db_level == 0 && db->db.db_object == DMU_META_DNODE_OBJECT) {
|
if (db->db_level == 0 && db->db.db_object == DMU_META_DNODE_OBJECT) {
|
||||||
dbuf_dirty_record_t *dr = db->db_data_pending;
|
|
||||||
/*
|
/*
|
||||||
* It should only be modified in syncing context, so
|
* It should only be modified in syncing context, so
|
||||||
* make sure we only have one copy of the data.
|
* make sure we only have one copy of the data.
|
||||||
*/
|
*/
|
||||||
ASSERT(dr == NULL || dr->dt.dl.dr_data == db->db_buf);
|
ASSERT(db->db_data_pending == NULL ||
|
||||||
|
db->db_data_pending->dt.dl.dr_data == db->db_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* verify db->db_blkptr */
|
/* verify db->db_blkptr */
|
||||||
|
@ -344,7 +344,6 @@ dbuf_verify(dmu_buf_impl_t *db)
|
||||||
&dn->dn_phys->dn_blkptr[db->db_blkid]);
|
&dn->dn_phys->dn_blkptr[db->db_blkid]);
|
||||||
} else {
|
} else {
|
||||||
/* db is pointed to by an indirect block */
|
/* db is pointed to by an indirect block */
|
||||||
int epb = db->db_parent->db.db_size >> SPA_BLKPTRSHIFT;
|
|
||||||
ASSERT3U(db->db_parent->db_level, ==, db->db_level+1);
|
ASSERT3U(db->db_parent->db_level, ==, db->db_level+1);
|
||||||
ASSERT3U(db->db_parent->db.db_object, ==,
|
ASSERT3U(db->db_parent->db.db_object, ==,
|
||||||
db->db.db_object);
|
db->db.db_object);
|
||||||
|
@ -356,7 +355,9 @@ dbuf_verify(dmu_buf_impl_t *db)
|
||||||
if (RW_WRITE_HELD(&db->db_dnode->dn_struct_rwlock)) {
|
if (RW_WRITE_HELD(&db->db_dnode->dn_struct_rwlock)) {
|
||||||
ASSERT3P(db->db_blkptr, ==,
|
ASSERT3P(db->db_blkptr, ==,
|
||||||
((blkptr_t *)db->db_parent->db.db_data +
|
((blkptr_t *)db->db_parent->db.db_data +
|
||||||
db->db_blkid % epb));
|
db->db_blkid %
|
||||||
|
(db->db_parent->db.db_size >>
|
||||||
|
SPA_BLKPTRSHIFT)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,11 +370,10 @@ dbuf_verify(dmu_buf_impl_t *db)
|
||||||
* data when we evict this buffer.
|
* data when we evict this buffer.
|
||||||
*/
|
*/
|
||||||
if (db->db_dirtycnt == 0) {
|
if (db->db_dirtycnt == 0) {
|
||||||
uint64_t *buf = db->db.db_data;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < db->db.db_size >> 3; i++) {
|
for (i = 0; i < db->db.db_size >> 3; i++) {
|
||||||
ASSERT(buf[i] == 0);
|
ASSERT(db->db.db_data[i] == 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -823,10 +823,8 @@ dmu_sync_ready(zio_t *zio, arc_buf_t *buf, void *varg)
|
||||||
blkptr_t *bp = zio->io_bp;
|
blkptr_t *bp = zio->io_bp;
|
||||||
|
|
||||||
if (!BP_IS_HOLE(bp)) {
|
if (!BP_IS_HOLE(bp)) {
|
||||||
dmu_sync_arg_t *in = varg;
|
ASSERT(BP_GET_TYPE(bp) == ((dmu_sync_arg_t *)
|
||||||
dbuf_dirty_record_t *dr = in->dr;
|
varg)->dr->dr_dbuf->db_dnode->dn_type);
|
||||||
dmu_buf_impl_t *db = dr->dr_dbuf;
|
|
||||||
ASSERT(BP_GET_TYPE(bp) == db->db_dnode->dn_type);
|
|
||||||
ASSERT(BP_GET_LEVEL(bp) == 0);
|
ASSERT(BP_GET_LEVEL(bp) == 0);
|
||||||
bp->blk_fill = 1;
|
bp->blk_fill = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -862,7 +862,7 @@ ready(zio_t *zio, arc_buf_t *abuf, void *arg)
|
||||||
bp->blk_fill += dnp->dn_blkptr[i].blk_fill;
|
bp->blk_fill += dnp->dn_blkptr[i].blk_fill;
|
||||||
|
|
||||||
if (zio->io_flags & ZIO_FLAG_IO_REWRITE) {
|
if (zio->io_flags & ZIO_FLAG_IO_REWRITE) {
|
||||||
ASSERT(DVA_EQUAL(BP_IDENTITY(bp), BP_IDENTITY(bp_orig)));
|
VERIFY(DVA_EQUAL(BP_IDENTITY(bp), BP_IDENTITY(bp_orig)));
|
||||||
} else {
|
} else {
|
||||||
if (zio->io_bp_orig.blk_birth == os->os_synctx->tx_txg)
|
if (zio->io_bp_orig.blk_birth == os->os_synctx->tx_txg)
|
||||||
(void) dsl_dataset_block_kill(os->os_dsl_dataset,
|
(void) dsl_dataset_block_kill(os->os_dsl_dataset,
|
||||||
|
|
|
@ -1702,7 +1702,7 @@ dsl_dataset_destroy_sync(void *arg1, void *tag, cred_t *cr, dmu_tx_t *tx)
|
||||||
|
|
||||||
if (ds->ds_phys->ds_next_clones_obj != 0) {
|
if (ds->ds_phys->ds_next_clones_obj != 0) {
|
||||||
uint64_t count;
|
uint64_t count;
|
||||||
ASSERT(0 == zap_count(mos,
|
VERIFY(0 == zap_count(mos,
|
||||||
ds->ds_phys->ds_next_clones_obj, &count) && count == 0);
|
ds->ds_phys->ds_next_clones_obj, &count) && count == 0);
|
||||||
VERIFY(0 == dmu_object_free(mos,
|
VERIFY(0 == dmu_object_free(mos,
|
||||||
ds->ds_phys->ds_next_clones_obj, tx));
|
ds->ds_phys->ds_next_clones_obj, tx));
|
||||||
|
|
|
@ -2897,7 +2897,6 @@ int
|
||||||
spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot, int replacing)
|
spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot, int replacing)
|
||||||
{
|
{
|
||||||
uint64_t txg, open_txg;
|
uint64_t txg, open_txg;
|
||||||
vdev_t *rvd = spa->spa_root_vdev;
|
|
||||||
vdev_t *oldvd, *newvd, *newrootvd, *pvd, *tvd;
|
vdev_t *oldvd, *newvd, *newrootvd, *pvd, *tvd;
|
||||||
vdev_ops_t *pvops;
|
vdev_ops_t *pvops;
|
||||||
dmu_tx_t *tx;
|
dmu_tx_t *tx;
|
||||||
|
@ -3015,7 +3014,7 @@ spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot, int replacing)
|
||||||
if (pvd->vdev_ops != pvops)
|
if (pvd->vdev_ops != pvops)
|
||||||
pvd = vdev_add_parent(oldvd, pvops);
|
pvd = vdev_add_parent(oldvd, pvops);
|
||||||
|
|
||||||
ASSERT(pvd->vdev_top->vdev_parent == rvd);
|
ASSERT(pvd->vdev_top->vdev_parent == spa->spa_root_vdev);
|
||||||
ASSERT(pvd->vdev_ops == pvops);
|
ASSERT(pvd->vdev_ops == pvops);
|
||||||
ASSERT(oldvd->vdev_parent == pvd);
|
ASSERT(oldvd->vdev_parent == pvd);
|
||||||
|
|
||||||
|
@ -3034,7 +3033,7 @@ spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot, int replacing)
|
||||||
|
|
||||||
tvd = newvd->vdev_top;
|
tvd = newvd->vdev_top;
|
||||||
ASSERT(pvd->vdev_top == tvd);
|
ASSERT(pvd->vdev_top == tvd);
|
||||||
ASSERT(tvd->vdev_parent == rvd);
|
ASSERT(tvd->vdev_parent == spa->spa_root_vdev);
|
||||||
|
|
||||||
vdev_config_dirty(tvd);
|
vdev_config_dirty(tvd);
|
||||||
|
|
||||||
|
@ -3093,7 +3092,6 @@ spa_vdev_detach(spa_t *spa, uint64_t guid, uint64_t pguid, int replace_done)
|
||||||
{
|
{
|
||||||
uint64_t txg;
|
uint64_t txg;
|
||||||
int error;
|
int error;
|
||||||
vdev_t *rvd = spa->spa_root_vdev;
|
|
||||||
vdev_t *vd, *pvd, *cvd, *tvd;
|
vdev_t *vd, *pvd, *cvd, *tvd;
|
||||||
boolean_t unspare = B_FALSE;
|
boolean_t unspare = B_FALSE;
|
||||||
uint64_t unspare_guid = 0;
|
uint64_t unspare_guid = 0;
|
||||||
|
@ -3238,7 +3236,7 @@ spa_vdev_detach(spa_t *spa, uint64_t guid, uint64_t pguid, int replace_done)
|
||||||
* may have been the previous top-level vdev.
|
* may have been the previous top-level vdev.
|
||||||
*/
|
*/
|
||||||
tvd = cvd->vdev_top;
|
tvd = cvd->vdev_top;
|
||||||
ASSERT(tvd->vdev_parent == rvd);
|
ASSERT(tvd->vdev_parent == spa->spa_root_vdev);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reevaluate the parent vdev state.
|
* Reevaluate the parent vdev state.
|
||||||
|
|
|
@ -1221,9 +1221,8 @@ vdev_validate(vdev_t *vd)
|
||||||
void
|
void
|
||||||
vdev_close(vdev_t *vd)
|
vdev_close(vdev_t *vd)
|
||||||
{
|
{
|
||||||
spa_t *spa = vd->vdev_spa;
|
ASSERT(spa_config_held(vd->vdev_spa, SCL_STATE_ALL, RW_WRITER) ==
|
||||||
|
SCL_STATE_ALL);
|
||||||
ASSERT(spa_config_held(spa, SCL_STATE_ALL, RW_WRITER) == SCL_STATE_ALL);
|
|
||||||
|
|
||||||
vd->vdev_ops->vdev_op_close(vd);
|
vd->vdev_ops->vdev_op_close(vd);
|
||||||
|
|
||||||
|
|
|
@ -749,8 +749,8 @@ mzap_addent(zap_name_t *zn, uint64_t value)
|
||||||
|
|
||||||
#ifdef ZFS_DEBUG
|
#ifdef ZFS_DEBUG
|
||||||
for (i = 0; i < zap->zap_m.zap_num_chunks; i++) {
|
for (i = 0; i < zap->zap_m.zap_num_chunks; i++) {
|
||||||
mzap_ent_phys_t *mze = &zap->zap_m.zap_phys->mz_chunk[i];
|
ASSERT(strcmp(zn->zn_name_orij,
|
||||||
ASSERT(strcmp(zn->zn_name_orij, mze->mze_name) != 0);
|
(&zap->zap_m.zap_phys->mz_chunk[i])->mze_name) != 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1529,7 +1529,6 @@ static void
|
||||||
zio_write_gang_member_ready(zio_t *zio)
|
zio_write_gang_member_ready(zio_t *zio)
|
||||||
{
|
{
|
||||||
zio_t *pio = zio_unique_parent(zio);
|
zio_t *pio = zio_unique_parent(zio);
|
||||||
zio_t *lio = zio->io_logical;
|
|
||||||
dva_t *cdva = zio->io_bp->blk_dva;
|
dva_t *cdva = zio->io_bp->blk_dva;
|
||||||
dva_t *pdva = pio->io_bp->blk_dva;
|
dva_t *pdva = pio->io_bp->blk_dva;
|
||||||
uint64_t asize;
|
uint64_t asize;
|
||||||
|
@ -1541,7 +1540,7 @@ zio_write_gang_member_ready(zio_t *zio)
|
||||||
ASSERT(BP_IS_HOLE(&zio->io_bp_orig));
|
ASSERT(BP_IS_HOLE(&zio->io_bp_orig));
|
||||||
|
|
||||||
ASSERT(zio->io_child_type == ZIO_CHILD_GANG);
|
ASSERT(zio->io_child_type == ZIO_CHILD_GANG);
|
||||||
ASSERT3U(zio->io_prop.zp_ndvas, ==, lio->io_prop.zp_ndvas);
|
ASSERT3U(zio->io_prop.zp_ndvas, ==, zio->io_logical->io_prop.zp_ndvas);
|
||||||
ASSERT3U(zio->io_prop.zp_ndvas, <=, BP_GET_NDVAS(zio->io_bp));
|
ASSERT3U(zio->io_prop.zp_ndvas, <=, BP_GET_NDVAS(zio->io_bp));
|
||||||
ASSERT3U(pio->io_prop.zp_ndvas, <=, BP_GET_NDVAS(pio->io_bp));
|
ASSERT3U(pio->io_prop.zp_ndvas, <=, BP_GET_NDVAS(pio->io_bp));
|
||||||
ASSERT3U(BP_GET_NDVAS(zio->io_bp), <=, BP_GET_NDVAS(pio->io_bp));
|
ASSERT3U(BP_GET_NDVAS(zio->io_bp), <=, BP_GET_NDVAS(pio->io_bp));
|
||||||
|
|
Loading…
Reference in New Issue