From: Eryu Guan <eguan@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Josef Bacik <jbacik@fb.com>,
fstests@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v4 1/8] log-writes: add replay-log program to replay dm-log-writes target
Date: Sat, 9 Sep 2017 18:22:02 +0800 [thread overview]
Message-ID: <20170909102202.GV8034@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1504778593-12071-2-git-send-email-amir73il@gmail.com>
On Thu, Sep 07, 2017 at 01:03:06PM +0300, Amir Goldstein wrote:
> Imported Josef Bacik's code from:
> https://github.com/josefbacik/log-writes.git
>
> Specialized program for replaying a write log that was recorded by
> device mapper log-writes target. The tools is used to perform
> crash consistency tests, allowing to run an arbitrary check tool
> (fsck) at specified checkpoints in the write log.
>
> [Amir:]
> - Add project Makefile and SOURCE files
> - Document the replay-log auxiliary program
> - Address review comments by Eryu Guan
>
> Cc: Josef Bacik <jbacik@fb.com>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
...
> diff --git a/src/log-writes/log-writes.h b/src/log-writes/log-writes.h
> new file mode 100644
> index 0000000..6cadb66
> --- /dev/null
> +++ b/src/log-writes/log-writes.h
> @@ -0,0 +1,77 @@
> +#ifndef _LOG_WRITES_H_
> +#define _LOG_WRITES_H_
> +
> +#include <linux/types.h>
> +#include <linux/byteorder/little_endian.h>
This only works on little endian hosts, big endian hosts like ppc64 fail
the tests with "Magic doesn't match" error, because le64_to_cpu is an
no-op there.
I did the following changes and it worked for me. If this looks fine to
you, I can fold the changes into the original patch.
--- 8< ---
diff --git a/src/log-writes/log-writes.h b/src/log-writes/log-writes.h
index 14242ee13c6b..0fb324a57c4d 100644
--- a/src/log-writes/log-writes.h
+++ b/src/log-writes/log-writes.h
@@ -2,7 +2,12 @@
#define _LOG_WRITES_H_
#include <linux/types.h>
-#include <linux/byteorder/little_endian.h>
+#include <endian.h>
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#include <linux/byteorder/little_endian.h>
+#else
+#include <linux/byteorder/big_endian.h>
+#endif
extern int log_writes_verbose;
--- >8 ---
Thanks,
Eryu
next prev parent reply other threads:[~2017-09-09 10:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 10:03 [PATCH v4 0/8] Crash consistency xfstest using dm-log-writes Amir Goldstein
2017-09-07 10:03 ` [PATCH v4 1/8] log-writes: add replay-log program to replay dm-log-writes target Amir Goldstein
2017-09-09 10:22 ` Eryu Guan [this message]
2017-09-07 10:03 ` [PATCH v4 2/8] replay-log: add validations for corrupt log entries Amir Goldstein
2017-09-07 10:03 ` [PATCH v4 3/8] replay-log: add support for replaying ops in target device sector range Amir Goldstein
2017-09-07 10:03 ` [PATCH v4 4/8] fstests: add support for working with dm-log-writes target Amir Goldstein
2017-09-07 10:03 ` [PATCH v4 5/8] fstests: crash consistency fsx test using dm-log-writes Amir Goldstein
2017-09-07 10:03 ` [PATCH v4 6/8] fstests: regression test for ext4 crash consistency bug Amir Goldstein
2017-09-07 10:03 ` [PATCH v4 7/8] fstests: crash consistency fsx test for cloned files Amir Goldstein
2017-09-07 10:03 ` [PATCH v4 8/8] fstests: regression test for xfs leftover CoW extent error Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170909102202.GV8034@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=amir73il@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=jbacik@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.