From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
linux-xfs <linux-xfs@vger.kernel.org>,
linux-nvdimm <linux-nvdimm@lists.01.org>,
fstests <fstests@vger.kernel.org>, Jan Kara <jack@suse.cz>,
Dave Chinner <david@fromorbit.com>
Subject: Re: [xfsprogs PATCH 1/2] xfs_io: add MAP_SYNC support to mmap()
Date: Fri, 17 Nov 2017 14:33:40 -0700 [thread overview]
Message-ID: <20171117213340.GA3910@linux.intel.com> (raw)
In-Reply-To: <CAPcyv4g+3Drmpwva1Cxpq0SNsR0SJwT1vZGmXt-NGgL_2Zt48Q@mail.gmail.com>
On Fri, Nov 17, 2017 at 12:35:43PM -0800, Dan Williams wrote:
> On Fri, Nov 17, 2017 at 12:25 PM, Ross Zwisler
> <ross.zwisler@linux.intel.com> wrote:
> > Add support for a new -S flag to xfs_io's mmap command. This opens the
> > mapping with the (MAP_SYNC | MAP_SHARED_VALIDATE) flags instead of the
> > standard MAP_SHARED flag.
> >
> > Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> > Suggested-by: Dave Chinner <david@fromorbit.com>
> > ---
> > configure.ac | 1 +
> > include/builddefs.in | 1 +
> > include/linux.h | 5 +++++
> > io/io.h | 1 +
> > io/mmap.c | 19 ++++++++++++++-----
> > m4/package_libcdev.m4 | 16 ++++++++++++++++
> > man/man8/xfs_io.8 | 6 +++++-
> > 7 files changed, 43 insertions(+), 6 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index cb23fb8..7153c9f 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -162,6 +162,7 @@ AC_HAVE_FSETXATTR
> > AC_HAVE_MREMAP
> > AC_NEED_INTERNAL_FSXATTR
> > AC_HAVE_GETFSMAP
> > +AC_HAVE_MAP_SYNC
> >
> > if test "$enable_blkid" = yes; then
> > AC_HAVE_BLKID_TOPO
> > diff --git a/include/builddefs.in b/include/builddefs.in
> > index 1d454b6..78b71fe 100644
> > --- a/include/builddefs.in
> > +++ b/include/builddefs.in
> > @@ -114,6 +114,7 @@ HAVE_FSETXATTR = @have_fsetxattr@
> > HAVE_MREMAP = @have_mremap@
> > NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@
> > HAVE_GETFSMAP = @have_getfsmap@
> > +HAVE_MAP_SYNC = @have_map_sync@
> >
> > GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
> > # -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
> > diff --git a/include/linux.h b/include/linux.h
> > index 6ce344c..4ee03ed 100644
> > --- a/include/linux.h
> > +++ b/include/linux.h
> > @@ -327,4 +327,9 @@ fsmap_advance(
> > #define HAVE_GETFSMAP
> > #endif /* HAVE_GETFSMAP */
> >
> > +#ifndef HAVE_MAP_SYNC
> > +#define MAP_SYNC 0x80000
>
> Hmm, this is the x86 specific value of MAP_SYNC. I think it would be
> better to define MAP_SYNC to zero in this case and check for MAP_SYNC
> == 0 at run time.
Ah, so instead of defining MAP_SYNC if the proper headers aren't installed,
set to 0 and disallow the -S option? Fair enough.
next prev parent reply other threads:[~2017-11-17 21:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 20:25 [xfsprogs PATCH 0/2] Add necessary items for MAP_SYNC testing Ross Zwisler
2017-11-17 20:25 ` [xfsprogs PATCH 1/2] xfs_io: add MAP_SYNC support to mmap() Ross Zwisler
2017-11-17 20:35 ` Dan Williams
2017-11-17 21:33 ` Ross Zwisler [this message]
2017-11-17 20:40 ` Darrick J. Wong
2017-11-17 21:44 ` Ross Zwisler
2017-11-17 20:25 ` [xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command Ross Zwisler
2017-11-17 20:39 ` Eric Sandeen
2017-11-17 20:48 ` Ross Zwisler
2017-11-17 21:03 ` Eric Sandeen
2017-11-17 21:14 ` Ross Zwisler
2017-11-18 4:44 ` Eric Sandeen
2017-11-17 20:44 ` Darrick J. Wong
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=20171117213340.GA3910@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=jack@suse.cz \
--cc=linux-nvdimm@lists.01.org \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox