[illumos-Developer] iSCSI UNMAP with DKIOCFREE

Dan McDonald danmcd at nexenta.com
Fri Feb 25 10:22:23 PST 2011


I saw your second reply, and I'll get to that in a bit, but I saw something
else in the first reply...

On Fri, Feb 25, 2011 at 08:21:45AM -0800, George Wilson wrote:

<SNIP!>

> I restructured the code below to simplify things. In particular, the
> thing that needs to happen is the zil_commit() needed to be moved up.

Agreed about the zil_commit() -- it's in an error path in the current webrev,
which is broken.

> objset_t *os = zv->zv_objset;
> 
> rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length, RL_WRITER);
> tx = dmu_tx_create(zv->zv_objset);
> error = dmu_tx_assign(tx, TXG_WAIT);
> if (error) {
> 	dmu_tx_abort(tx);
	/* XXX KEBE ASKS --> what about the zfs range? */
> 	break;
> }

Shouldn't we unlock the zfs range even if dmu_tx_assign() fails?
I figure it should, so I have code compiling that reflects this (and looks
more like my webrev again).

Dan



More information about the Developer mailing list