]> git.proxmox.com Git - zfsonlinux.git/blame - zfs-patches/0046-Increment-zil_itx_needcopy_bytes-properly.patch
bump version to 0.7.7-pve1~bpo9
[zfsonlinux.git] / zfs-patches / 0046-Increment-zil_itx_needcopy_bytes-properly.patch
CommitLineData
75b07eca
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: chrisrd <chris@onthe.net.au>
3Date: Sat, 3 Mar 2018 05:01:53 +1100
4Subject: [PATCH] Increment zil_itx_needcopy_bytes properly
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9In zil_lwb_commit() with TX_WRITE, we copy the log write record (lrw)
10into the log write block (lwb) and send it off using zil_lwb_add_txg().
11If we also have WR_NEED_COPY, we additionally copy the lwr's data into
12the lwb to be sent off. If the lwr + data doesn't fit into the lwb, we
13send the lrw and as much data as will fit (dnow bytes), then go back
14and do the same with the remaining data.
15
16Each time through this loop we're sending dnow data bytes. I.e.
17zil_itx_needcopy_bytes should be incremented by dnow.
18
19Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
20Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
21Signed-off-by: Chris Dunlop <chris@onthe.net.au>
22Closes #6988
23Closes #7176
24(cherry picked from commit 792f88131c647a70440c709c78d43210db6c6534)
25Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
26---
27 module/zfs/zil.c | 3 +--
28 1 file changed, 1 insertion(+), 2 deletions(-)
29
30diff --git a/module/zfs/zil.c b/module/zfs/zil.c
31index 4d714cefc..645b1d4d8 100644
32--- a/module/zfs/zil.c
33+++ b/module/zfs/zil.c
34@@ -1167,8 +1167,7 @@ cont:
35 lrw->lr_offset += dnow;
36 lrw->lr_length -= dnow;
37 ZIL_STAT_BUMP(zil_itx_needcopy_count);
38- ZIL_STAT_INCR(zil_itx_needcopy_bytes,
39- lrw->lr_length);
40+ ZIL_STAT_INCR(zil_itx_needcopy_bytes, dnow);
41 } else {
42 ASSERT(itx->itx_wr_state == WR_INDIRECT);
43 dbuf = NULL;
44--
452.14.2
46