6493634 zvol should return ENOTSUP on DKIOCGVTOC ioctl
6496365 assertion failed: refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite
--- a/usr/src/uts/common/fs/zfs/dmu_tx.c Thu Dec 14 10:38:36 2006 -0800
+++ b/usr/src/uts/common/fs/zfs/dmu_tx.c Thu Dec 14 11:54:54 2006 -0800
@@ -545,11 +545,15 @@
return;
}
+ /*
+ * Use max block size here, since we don't know how much
+ * the size will change between now and the dbuf dirty call.
+ */
if (dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset,
dn->dn_phys->dn_blkptr[0].blk_birth))
- txh->txh_space_tooverwrite += dn->dn_datablksz;
+ txh->txh_space_tooverwrite += SPA_MAXBLOCKSIZE;
else
- txh->txh_space_towrite += dn->dn_datablksz;
+ txh->txh_space_towrite += SPA_MAXBLOCKSIZE;
return;
}
--- a/usr/src/uts/common/fs/zfs/zvol.c Thu Dec 14 10:38:36 2006 -0800
+++ b/usr/src/uts/common/fs/zfs/zvol.c Thu Dec 14 11:54:54 2006 -0800
@@ -1068,6 +1068,12 @@
}
return (error);
+ case DKIOCGGEOM:
+ case DKIOCGVTOC:
+ /* commands using these (like prtvtoc) expect ENOTSUP */
+ error = ENOTSUP;
+ break;
+
default:
error = ENOTTY;
break;