]> granicus.if.org Git - zfs/commit
Increment zil_itx_needcopy_bytes properly
authorchrisrd <chris@onthe.net.au>
Fri, 2 Mar 2018 18:01:53 +0000 (05:01 +1100)
committerTony Hutter <hutter2@llnl.gov>
Wed, 14 Mar 2018 23:10:38 +0000 (16:10 -0700)
commit792f88131c647a70440c709c78d43210db6c6534
tree0221d79dc0b9054e6e03a7fd63078c2920bc3340
parent33bb1e82568a9734cc3f41d3e1d33003ebf0e123
Increment zil_itx_needcopy_bytes properly

In zil_lwb_commit() with TX_WRITE, we copy the log write record (lrw)
into the log write block (lwb) and send it off using zil_lwb_add_txg().
If we also have WR_NEED_COPY, we additionally copy the lwr's data into
the lwb to be sent off.  If the lwr + data doesn't fit into the lwb, we
send the lrw and as much data as will fit (dnow bytes), then go back
and do the same with the remaining data.

Each time through this loop we're sending dnow data bytes. I.e.
zil_itx_needcopy_bytes should be incremented by dnow.

Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Closes #6988
Closes #7176
module/zfs/zil.c