From patchwork Wed Jun 20 03:12:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 10475849 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 3A844600F6 for ; Wed, 20 Jun 2018 03:24:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27E7528B9B for ; Wed, 20 Jun 2018 03:24:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1920C28BAC; Wed, 20 Jun 2018 03:24:33 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 ABC2228B9B for ; Wed, 20 Jun 2018 03:24:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754030AbeFTDYc (ORCPT ); Tue, 19 Jun 2018 23:24:32 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:57859 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753930AbeFTDYb (ORCPT ); Tue, 19 Jun 2018 23:24:31 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="41278482" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 20 Jun 2018 11:24:30 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id C14584B41ECF; Wed, 20 Jun 2018 11:24:27 +0800 (CST) Received: from RHEL7U5Alpha_SERVER.g08.fujitsu.local (10.167.220.185) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.399.0; Wed, 20 Jun 2018 11:24:28 +0800 From: Xiao Yang To: CC: , Xiao Yang Subject: [PATCH] src/t_stripealign.c: Fix complier error Date: Wed, 20 Jun 2018 11:12:00 +0800 Message-ID: <1529464320-6721-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.220.185] X-yoursite-MailScanner-ID: C14584B41ECF.AAC14 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The FIEMAP_EXTENT_SHARED flag was added into kernel since commit 8c0414cd524e, so undefined FIEMAP_EXTENT_SHARED resulted in complier error on old distros(e.g. RHEL6), as below: ---------------------------------------------------------------------- t_stripealign.c:99: error: 'FIEMAP_EXTENT_SHARED' undeclared (first use in this function) ---------------------------------------------------------------------- We fix it by defining the flag manually. Signed-off-by: Xiao Yang Reviewed-by: Darrick J. Wong --- src/t_stripealign.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/t_stripealign.c b/src/t_stripealign.c index 690f743..2685d97 100644 --- a/src/t_stripealign.c +++ b/src/t_stripealign.c @@ -20,6 +20,10 @@ #include #include +#ifndef FIEMAP_EXTENT_SHARED +# define FIEMAP_EXTENT_SHARED 0x00002000 +#endif + #define FIEMAP_EXTENT_ACCEPTABLE (FIEMAP_EXTENT_LAST | \ FIEMAP_EXTENT_DATA_ENCRYPTED | FIEMAP_EXTENT_ENCODED | \ FIEMAP_EXTENT_UNWRITTEN | FIEMAP_EXTENT_MERGED | \