From: Pankaj Gupta <pagupta@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Jan Kara <jack@suse.cz>, KVM list <kvm@vger.kernel.org>,
"Michael S. Tsirkin" <mst@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>,
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>,
Igor Mammedov <imammedo@redhat.com>,
lcapitulino@r
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-10 15:51 ` [PATCH v8 3/6] libnvdimm: add dax_dev sync flag 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
[not found] ` <20190510155202.14737-4-pagupta@redhat.com>
2019-05-10 20:14 ` [PATCH v8 3/6] libnvdimm: add dax_dev sync flag Dan Williams
[not found] ` <CAPcyv4hbVNRFSyS2CTbmO88uhnbeH4eiukAng2cxgbDzLfizwg@mail.gmail.com>
2019-05-11 0:45 ` Pankaj Gupta
[not found] ` <864186878.28040999.1557535549792.JavaMail.zimbra@redhat.com>
2019-05-11 0:59 ` Dan Williams
[not found] ` <CAPcyv4gL3ODfOr52Ztgq7BM4gVf1cih6cj0271gcpVvpi9aFSA@mail.gmail.com>
2019-05-11 1:23 ` Pankaj Gupta [this message]
2019-05-13 17:32 ` [Qemu-devel] " Pankaj Gupta
[not found] ` <116369545.28425569.1557768748009.JavaMail.zimbra@redhat.com>
2019-05-13 17:52 ` Dan Williams
2019-05-14 5:27 ` Pankaj Gupta
2019-05-10 20:15 ` [PATCH v8 0/6] virtio pmem driver Dan Williams
[not found] ` <CAPcyv4joEZaePvzc__N9Q3nozoHgQn7hNFPjBVo5BP6cc4rkEA@mail.gmail.com>
2019-05-10 23:33 ` Pankaj Gupta
2019-05-12 16:52 ` Michael S. Tsirkin
[not found] ` <20190510155202.14737-3-pagupta@redhat.com>
2019-05-12 16:51 ` [PATCH v8 2/6] virtio-pmem: Add " Michael S. Tsirkin
[not found] ` <20190512124954-mutt-send-email-mst@kernel.org>
2019-05-13 4:43 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 8:19 ` David Hildenbrand
[not found] ` <f2ea35a6-ec98-447c-44fe-0cb3ab309340@redhat.com>
2019-05-14 9:27 ` Pankaj Gupta
[not found] ` <752392764.28554139.1557826022323.JavaMail.zimbra@redhat.com>
2019-05-14 9:34 ` David Hildenbrand
[not found] ` <86298c2c-cc7c-5b97-0f11-335d7da8c450@redhat.com>
2019-05-14 9:47 ` Pankaj Gupta
[not found] ` <712871093.28555872.1557827242385.JavaMail.zimbra@redhat.com>
2019-05-14 9:57 ` David Hildenbrand
[not found] ` <cd5572ac-14d0-f872-6321-c522daa70f49@redhat.com>
2019-05-14 10:02 ` Pankaj Gupta
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=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=imammedo@redhat.com \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=jstaron@google.com \
--cc=kilobyte@angband.pl \
--cc=kvm@vger.kernel.org \
--cc=lcapitulino@r \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riel@surriel.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=vishal.l.verma@intel.com \
--cc=willy@infradead.org \
--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).