From: Pankaj Gupta <pagupta@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: cohuck@redhat.com, Jan Kara <jack@suse.cz>,
KVM list <kvm@vger.kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>, david <david@fromorbit.com>,
Qemu Developers <qemu-devel@nongnu.org>,
virtualization@lists.linux-foundation.org,
Andreas Dilger <adilger.kernel@dilger.ca>,
Ross Zwisler <zwisler@kernel.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Dave Jiang <dave.jiang@intel.com>,
jstaron@google.com, linux-nvdimm <linux-nvdimm@lists.01.org>,
Vishal L Verma <vishal.l.verma@intel.com>,
David Hildenbrand <david@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Christoph Hellwig <hch@infradead.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
jmoyer <jmoyer@redhat.com>,
linux-ext4 <linux-ext4@vger.kernel.org>,
Len Brown <lenb@kernel.org>, Adam Borowski <kilobyte@angband.pl>,
Rik van Riel <riel@surriel.com>,
yuval shaia <yuval.shaia@oracle.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
lcapitulino@redhat.com, Kevin Wolf <kwolf@redhat.com>,
Nitesh Narayan Lal <nilal@redhat.com>,
Theodore Ts'o <tytso@mit.edu>,
Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-xfs <linux-xfs@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag
Date: Fri, 10 May 2019 21:23:17 -0400 (EDT) [thread overview]
Message-ID: <2003480558.28042237.1557537797923.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAPcyv4gL3ODfOr52Ztgq7BM4gVf1cih6cj0271gcpVvpi9aFSA@mail.gmail.com>
> > > >
> > > > This patch adds 'DAXDEV_SYNC' flag which is set
> > > > for nd_region doing synchronous flush. This later
> > > > is used to disable MAP_SYNC functionality for
> > > > ext4 & xfs filesystem for devices don't support
> > > > synchronous flush.
> > > >
> > > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > > ---
> > > > drivers/dax/bus.c | 2 +-
> > > > drivers/dax/super.c | 13 ++++++++++++-
> > > > drivers/md/dm.c | 3 ++-
> > > > drivers/nvdimm/pmem.c | 5 ++++-
> > > > drivers/nvdimm/region_devs.c | 7 +++++++
> > > > include/linux/dax.h | 8 ++++++--
> > > > include/linux/libnvdimm.h | 1 +
> > > > 7 files changed, 33 insertions(+), 6 deletions(-)
> > > [..]
> > > > diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> > > > index 043f0761e4a0..ee007b75d9fd 100644
> > > > --- a/drivers/md/dm.c
> > > > +++ b/drivers/md/dm.c
> > > > @@ -1969,7 +1969,8 @@ static struct mapped_device *alloc_dev(int minor)
> > > > sprintf(md->disk->disk_name, "dm-%d", minor);
> > > >
> > > > if (IS_ENABLED(CONFIG_DAX_DRIVER)) {
> > > > - dax_dev = alloc_dax(md, md->disk->disk_name,
> > > > &dm_dax_ops);
> > > > + dax_dev = alloc_dax(md, md->disk->disk_name,
> > > > &dm_dax_ops,
> > > > +
> > > > DAXDEV_F_SYNC);
> > >
> > > Apologies for not realizing this until now, but this is broken.
> > > Imaging a device-mapper configuration composed of both 'async'
> > > virtio-pmem and 'sync' pmem. The 'sync' flag needs to be unified
> > > across all members. I would change this argument to '0' and then
> > > arrange for it to be set at dm_table_supports_dax() time after
> > > validating that all components support synchronous dax.
> >
> > o.k. Need to set 'DAXDEV_F_SYNC' flag after verifying all the target
> > components support synchronous DAX.
> >
> > Just a question, If device mapper configuration have composed of both
> > virtio-pmem or pmem devices, we want to configure device mapper for async
> > flush?
>
> If it's composed of both then, yes, it needs to be async flush at the
> device-mapper level. Otherwise MAP_SYNC will succeed and fail to
> trigger fsync on the host file when necessary for the virtio-pmem
> backed portion of the device-mapper device.
o.k. Agree.
Thanks you,
Pankaj
>
>
next prev parent reply other threads:[~2019-05-11 1:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 15:51 [PATCH v8 0/6] virtio pmem driver Pankaj Gupta
2019-05-10 15:51 ` [PATCH v8 1/6] libnvdimm: nd_region flush callback support Pankaj Gupta
2019-05-10 15:51 ` [PATCH v8 2/6] virtio-pmem: Add virtio pmem driver Pankaj Gupta
2019-05-12 16:51 ` Michael S. Tsirkin
2019-05-13 4:43 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 8:19 ` David Hildenbrand
2019-05-14 9:27 ` Pankaj Gupta
2019-05-14 9:34 ` David Hildenbrand
2019-05-14 9:47 ` Pankaj Gupta
2019-05-14 9:57 ` David Hildenbrand
2019-05-14 10:02 ` Pankaj Gupta
2019-05-10 15:51 ` [PATCH v8 3/6] libnvdimm: add dax_dev sync flag Pankaj Gupta
2019-05-10 20:14 ` Dan Williams
2019-05-11 0:45 ` Pankaj Gupta
2019-05-11 0:59 ` Dan Williams
2019-05-11 1:23 ` Pankaj Gupta [this message]
2019-05-13 17:32 ` [Qemu-devel] " Pankaj Gupta
2019-05-13 17:52 ` Dan Williams
2019-05-14 5:27 ` Pankaj Gupta
2019-05-10 15:52 ` [PATCH v8 4/6] dax: check synchronous mapping is supported Pankaj Gupta
2019-05-10 15:52 ` [PATCH v8 5/6] ext4: disable map_sync for async flush Pankaj Gupta
2019-05-10 15:52 ` [PATCH v8 6/6] xfs: " Pankaj Gupta
2019-05-10 16:30 ` [PATCH v8 0/6] virtio pmem driver Michael S. Tsirkin
2019-05-10 20:15 ` Dan Williams
2019-05-10 23:33 ` Pankaj Gupta
2019-05-12 16:52 ` Michael S. Tsirkin
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=2003480558.28042237.1557537797923.JavaMail.zimbra@redhat.com \
--to=pagupta@redhat.com \
--cc=aarcange@redhat.com \
--cc=adilger.kernel@dilger.ca \
--cc=cohuck@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=darrick.wong@oracle.com \
--cc=dave.jiang@intel.com \
--cc=david@fromorbit.com \
--cc=david@redhat.com \
--cc=hch@infradead.org \
--cc=imammedo@redhat.com \
--cc=jack@suse.cz \
--cc=jasowang@redhat.com \
--cc=jmoyer@redhat.com \
--cc=jstaron@google.com \
--cc=kilobyte@angband.pl \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mst@redhat.com \
--cc=nilal@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riel@surriel.com \
--cc=rjw@rjwysocki.net \
--cc=stefanha@redhat.com \
--cc=tytso@mit.edu \
--cc=virtualization@lists.linux-foundation.org \
--cc=vishal.l.verma@intel.com \
--cc=willy@infradead.org \
--cc=xiaoguangrong.eric@gmail.com \
--cc=yuval.shaia@oracle.com \
--cc=zwisler@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;
as well as URLs for NNTP newsgroup(s).