xfsdump: fill in bs_forkoff

Upstream, the structure containing bs_forkoff is actually zeroed
prior to these functions, but when pulling the patch back to an
older xfsdump, we got checksum errors due to an uninitialized
bs_forkoff not matching in dump vs. restore.

So even though forkoff won't be explicitly restored from
a dump, do explicitly set it in these routines to keep checksums

This fixes 'bad header checksum' errors in xfsrestore, which were
introduced by commit 1e309da7.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
diff --git a/common/arch_xlate.c b/common/arch_xlate.c
index e42abd5..bafc1a6 100644
--- a/common/arch_xlate.c
+++ b/common/arch_xlate.c
@@ -377,6 +377,7 @@
 	IXLATE(bs1, bs2, bs_extents);
 	IXLATE(bs1, bs2, bs_gen);
 	IXLATE(bs1, bs2, bs_projid_lo);
+	IXLATE(bs1, bs2, bs_forkoff);
 	IXLATE(bs1, bs2, bs_projid_hi);
 	IXLATE(bs1, bs2, bs_dmevmask);
 	IXLATE(bs1, bs2, bs_dmstate);
diff --git a/dump/content.c b/dump/content.c
index ec5e954..9a36fe1 100644
--- a/dump/content.c
+++ b/dump/content.c
@@ -4928,6 +4928,7 @@
 	dst->bs_extents = src->bs_extents;
 	dst->bs_gen = src->bs_gen;
 	dst->bs_projid_lo = src->bs_projid_lo;
+	dst->bs_forkoff = src->bs_forkoff;
 	dst->bs_projid_hi = src->bs_projid_hi;
 	dst->bs_dmevmask = src->bs_dmevmask;
 	dst->bs_dmstate = src->bs_dmstate;