From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] src/t_stripealign.c: Fix complier error
Date: Tue, 19 Jun 2018 20:30:29 -0700 [thread overview]
Message-ID: <20180620033029.GA4850@magnolia> (raw)
In-Reply-To: <1529464320-6721-1-git-send-email-yangx.jy@cn.fujitsu.com>
On Wed, Jun 20, 2018 at 11:12:00AM +0800, Xiao Yang wrote:
> 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 <yangx.jy@cn.fujitsu.com>
Oops, yeah, sorry about that.
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> 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 <linux/fiemap.h>
> #include <linux/fs.h>
>
> +#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 | \
> --
> 1.7.1
>
>
>
prev parent reply other threads:[~2018-06-20 3:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 3:12 [PATCH] src/t_stripealign.c: Fix complier error Xiao Yang
2018-06-20 3:30 ` Darrick J. Wong [this message]
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=20180620033029.GA4850@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=yangx.jy@cn.fujitsu.com \
/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.