From patchwork Sat Sep 9 10:22:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 9945321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C026D604D7 for ; Sat, 9 Sep 2017 10:22:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B18A128A34 for ; Sat, 9 Sep 2017 10:22:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A667828A3D; Sat, 9 Sep 2017 10:22:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0531928A3C for ; Sat, 9 Sep 2017 10:22:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757477AbdIIKWX (ORCPT ); Sat, 9 Sep 2017 06:22:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43356 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757364AbdIIKWF (ORCPT ); Sat, 9 Sep 2017 06:22:05 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EB7B83F3D; Sat, 9 Sep 2017 10:22:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3EB7B83F3D Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eguan@redhat.com Received: from localhost (dhcp-12-147.nay.redhat.com [10.66.12.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7F325EDE3; Sat, 9 Sep 2017 10:22:04 +0000 (UTC) Date: Sat, 9 Sep 2017 18:22:02 +0800 From: Eryu Guan To: Amir Goldstein Cc: Josef Bacik , 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 Message-ID: <20170909102202.GV8034@eguan.usersys.redhat.com> References: <1504778593-12071-1-git-send-email-amir73il@gmail.com> <1504778593-12071-2-git-send-email-amir73il@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1504778593-12071-2-git-send-email-amir73il@gmail.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 09 Sep 2017 10:22:05 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 > Signed-off-by: Amir Goldstein > --- ... > 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 > +#include 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 Thanks, Eryu --- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/src/log-writes/log-writes.h +++ b/src/log-writes/log-writes.h @@ -2,7 +2,12 @@ #define _LOG_WRITES_H_ #include -#include +#include +#if __BYTE_ORDER == __LITTLE_ENDIAN +#include +#else +#include +#endif extern int log_writes_verbose; --- >8 ---