75b07eca3e
by importing the upstream release as patches. replace user namespace patch with version which has been applied usptream.
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: chrisrd <chris@onthe.net.au>
|
|
Date: Sat, 3 Mar 2018 05:01:53 +1100
|
|
Subject: [PATCH] Increment zil_itx_needcopy_bytes properly
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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
|
|
(cherry picked from commit 792f88131c647a70440c709c78d43210db6c6534)
|
|
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
|
---
|
|
module/zfs/zil.c | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
diff --git a/module/zfs/zil.c b/module/zfs/zil.c
|
|
index 4d714cefc..645b1d4d8 100644
|
|
--- a/module/zfs/zil.c
|
|
+++ b/module/zfs/zil.c
|
|
@@ -1167,8 +1167,7 @@ cont:
|
|
lrw->lr_offset += dnow;
|
|
lrw->lr_length -= dnow;
|
|
ZIL_STAT_BUMP(zil_itx_needcopy_count);
|
|
- ZIL_STAT_INCR(zil_itx_needcopy_bytes,
|
|
- lrw->lr_length);
|
|
+ ZIL_STAT_INCR(zil_itx_needcopy_bytes, dnow);
|
|
} else {
|
|
ASSERT(itx->itx_wr_state == WR_INDIRECT);
|
|
dbuf = NULL;
|
|
--
|
|
2.14.2
|
|
|