[illumos-Developer] iSCSI UNMAP with DKIOCFREE

Dan McDonald danmcd at nexenta.com
Fri Feb 25 10:34:35 PST 2011


Hmmm, had less to say here than I thought.

On Fri, Feb 25, 2011 at 08:57:51AM -0800, George Wilson wrote:
> The zvol_replay_write() will work because we're only dealing with one
> transaction. What I'm concerned about is the fact that
> dmu_free_long_range() will create multiple transactions. That said,
> it might still work since the log record will still exist on disk.
> 
> Let's leave that code the same (with the exception of the itx_sync
> change) and try the reboot experiment I mentioned. But you'll want to
> add another reboot point in zvol_replay_truncate() prior to calling
> dmu_free_long_range() and also after it. What we need to see is that
> zvol_replay_truncate() is called after these reboot points. If they
> are then we're still replaying the same log block on disk and we can
> leave the code the same. Make sense?

It makes tons of sense.  Bottom line:  It stays in the ZIL until it gets
written out to disk.

> >Earlier you said:
> >
> >	after line# 1694 - you need to a zil_commit() but only if error != 0
> >
> >you must've meant the return from dmu_tx_assign(), not the return from
> >dmu_free_long_range().  I assumed the latter.
> 
> Hmm, I guess if we failed to free the blocks then we probably
> shouldn't commit the zil either. Good point.

This bit prompted my previous question about the unlock even upon failure.

Dan



More information about the Developer mailing list