changeset 12700:0f31afc2abec

6913010 assertion failed: error||lr->lr_length <= zp->z_blksz, file: ../../common/fs/zfs/zfs_vnops.c (fix 32bit build)
author Neil Perrin <Neil.Perrin@Sun.COM>
date Fri, 25 Jun 2010 19:54:26 -0600
parents 36aebb51164a
children 8c9362e17ee4
files usr/src/cmd/ztest/ztest.c usr/src/uts/common/fs/zfs/sys/zil.h usr/src/uts/common/fs/zfs/zfs_log.c usr/src/uts/common/fs/zfs/zfs_vnops.c usr/src/uts/common/fs/zfs/zil.c
diffstat 5 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/ztest/ztest.c	Fri Jun 25 15:50:31 2010 -0600
+++ b/usr/src/cmd/ztest/ztest.c	Fri Jun 25 19:54:26 2010 -0600
@@ -1133,7 +1133,7 @@
 	bcopy(&lr->lr_common + 1, &itx->itx_lr + 1,
 	    sizeof (*lr) + namesize - sizeof (lr_t));
 
-	itx->itx_private = (void *)object;
+	itx->itx_oid = object;
 	zil_itx_assign(zd->zd_zilog, itx, tx);
 }
 
--- a/usr/src/uts/common/fs/zfs/sys/zil.h	Fri Jun 25 15:50:31 2010 -0600
+++ b/usr/src/uts/common/fs/zfs/sys/zil.h	Fri Jun 25 19:54:26 2010 -0600
@@ -367,6 +367,7 @@
 	itx_wr_state_t	itx_wr_state;	/* write state */
 	uint8_t		itx_sync;	/* synchronous transaction */
 	uint64_t	itx_sod;	/* record size on disk */
+	uint64_t	itx_oid;	/* object id */
 	lr_t		itx_lr;		/* common part of log record */
 	/* followed by type-specific part of lr_xx_t and its immediate data */
 } itx_t;
--- a/usr/src/uts/common/fs/zfs/zfs_log.c	Fri Jun 25 15:50:31 2010 -0600
+++ b/usr/src/uts/common/fs/zfs/zfs_log.c	Fri Jun 25 19:54:26 2010 -0600
@@ -353,8 +353,7 @@
 	lr->lr_doid = dzp->z_id;
 	bcopy(name, (char *)(lr + 1), namesize);
 
-	/* pass the object id through itx_private */
-	itx->itx_private = (void *)foid;
+	itx->itx_oid = foid;
 
 	zil_itx_assign(zilog, itx, tx);
 }
--- a/usr/src/uts/common/fs/zfs/zfs_vnops.c	Fri Jun 25 15:50:31 2010 -0600
+++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c	Fri Jun 25 19:54:26 2010 -0600
@@ -1533,6 +1533,7 @@
 	zilog_t		*zilog;
 	uint64_t	acl_obj, xattr_obj = 0;
 	uint64_t 	xattr_obj_unlinked = 0;
+	uint64_t	obj = 0;
 	zfs_dirlock_t	*dl;
 	dmu_tx_t	*tx;
 	boolean_t	may_delete_now, delete_now = FALSE;
@@ -1596,6 +1597,7 @@
 	 * other holds on the vnode.  So we dmu_tx_hold() the right things to
 	 * allow for either case.
 	 */
+	obj = zp->z_id;
 	tx = dmu_tx_create(zfsvfs->z_os);
 	dmu_tx_hold_zap(tx, dzp->z_id, FALSE, name);
 	dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);
@@ -1706,7 +1708,7 @@
 	txtype = TX_REMOVE;
 	if (flags & FIGNORECASE)
 		txtype |= TX_CI;
-	zfs_log_remove(zilog, tx, txtype, dzp, name, zp->z_id);
+	zfs_log_remove(zilog, tx, txtype, dzp, name, obj);
 
 	dmu_tx_commit(tx);
 out:
--- a/usr/src/uts/common/fs/zfs/zil.c	Fri Jun 25 15:50:31 2010 -0600
+++ b/usr/src/uts/common/fs/zfs/zil.c	Fri Jun 25 19:54:26 2010 -0600
@@ -1178,7 +1178,7 @@
 	 * the new file data and flushes a write record for the old object.
 	 */
 	if ((itx->itx_lr.lrc_txtype & ~TX_CI) == TX_REMOVE)
-		zil_remove_async(zilog, (uint64_t)itx->itx_private);
+		zil_remove_async(zilog, itx->itx_oid);
 
 	if (spa_freeze_txg(zilog->zl_spa) !=  UINT64_MAX)
 		txg = ZILTEST_TXG;