public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsdump:fill in bs_forkoff
@ 2012-10-19  4:02 Eric Sandeen
  2012-10-23 12:26 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Eric Sandeen @ 2012-10-19  4:02 UTC (permalink / raw)
  To: xfs-oss

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
happy.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Tested w/ ./check -g dump on a 3.6.0 kernel, no failures.

Setting to 0 would work too, if that would be better?
It just looked odd.



Index: xfsdump-3.0.4/common/arch_xlate.c
===================================================================
--- xfsdump-3.0.4.orig/common/arch_xlate.c
+++ xfsdump-3.0.4/common/arch_xlate.c
@@ -377,6 +377,7 @@ xlate_bstat(bstat_t *bs1, bstat_t *bs2, 
 	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);
Index: xfsdump-3.0.4/dump/content.c
===================================================================
--- xfsdump-3.0.4.orig/dump/content.c
+++ xfsdump-3.0.4/dump/content.c
@@ -5072,6 +5072,7 @@ copy_xfs_bstat(bstat_t *dst, xfs_bstat_t
 	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;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-02 17:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19  4:02 [PATCH] xfsdump:fill in bs_forkoff Eric Sandeen
2012-10-23 12:26 ` Christoph Hellwig
2012-10-30 19:47 ` Ben Myers
2012-10-30 19:54   ` Eric Sandeen
2012-10-31 19:46     ` Ben Myers
2012-11-02  4:35       ` Eric Sandeen
2012-11-02  5:15         ` Dave Chinner
2012-11-02 16:47         ` Ben Myers
2012-11-02 17:24 ` Ben Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox