From: Dan Williams <dan.j.williams@intel.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: Pankaj Gupta <pagupta@redhat.com>,
cohuck@redhat.com, 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,
device-mapper development <dm-devel@redhat.com>,
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>
Subject: Re: [PATCH v9 4/7] dm: enable synchronous dax
Date: Wed, 15 May 2019 13:48:57 -0700 [thread overview]
Message-ID: <CAPcyv4jp+9eBQMX+KXhT1oZRkxLeCp9r9g9hFUCRw=OcuQ9wmQ__27344.6264838398$1557953364$gmane$org@mail.gmail.com> (raw)
In-Reply-To: <20190514145422.16923-5-pagupta@redhat.com>
[ add Mike and dm-devel ]
Mike, any concerns with the below addition to the device-mapper-dax
implementation?
On Tue, May 14, 2019 at 7:58 AM Pankaj Gupta <pagupta@redhat.com> wrote:
>
> This patch sets dax device 'DAXDEV_SYNC' flag if all the target
> devices of device mapper support synchrononous DAX. If device
> mapper consists of both synchronous and asynchronous dax devices,
> we don't set 'DAXDEV_SYNC' flag.
>
> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> ---
> drivers/md/dm-table.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index cde3b49b2a91..1cce626ff576 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -886,10 +886,17 @@ static int device_supports_dax(struct dm_target *ti, struct dm_dev *dev,
> return bdev_dax_supported(dev->bdev, PAGE_SIZE);
> }
>
> +static int device_synchronous(struct dm_target *ti, struct dm_dev *dev,
> + sector_t start, sector_t len, void *data)
> +{
> + return dax_synchronous(dev->dax_dev);
> +}
> +
> static bool dm_table_supports_dax(struct dm_table *t)
> {
> struct dm_target *ti;
> unsigned i;
> + bool dax_sync = true;
>
> /* Ensure that all targets support DAX. */
> for (i = 0; i < dm_table_get_num_targets(t); i++) {
> @@ -901,7 +908,14 @@ static bool dm_table_supports_dax(struct dm_table *t)
> if (!ti->type->iterate_devices ||
> !ti->type->iterate_devices(ti, device_supports_dax, NULL))
> return false;
> +
> + /* Check devices support synchronous DAX */
> + if (dax_sync &&
> + !ti->type->iterate_devices(ti, device_synchronous, NULL))
> + dax_sync = false;
> }
> + if (dax_sync)
> + set_dax_synchronous(t->md->dax_dev);
>
> return true;
> }
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-05-15 20:48 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 14:54 [PATCH v9 0/7] virtio pmem driver Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [PATCH v9 1/7] libnvdimm: nd_region flush callback support Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-15 21:07 ` Dan Williams
2019-05-15 21:07 ` Dan Williams
2019-05-15 21:07 ` [Qemu-devel] " Dan Williams
2019-05-15 21:07 ` Dan Williams
2019-05-16 6:28 ` Pankaj Gupta
2019-05-16 6:28 ` Pankaj Gupta
2019-05-16 6:28 ` [Qemu-devel] " Pankaj Gupta
2019-05-16 6:28 ` Pankaj Gupta
2019-05-14 14:54 ` [PATCH v9 2/7] virtio-pmem: Add virtio pmem driver Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 15:09 ` Randy Dunlap
2019-05-14 15:09 ` [Qemu-devel] " Randy Dunlap
2019-05-14 15:09 ` Randy Dunlap
2019-05-14 15:25 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 15:25 ` Pankaj Gupta
2019-05-14 15:25 ` Pankaj Gupta
2019-05-14 15:25 ` Pankaj Gupta
2019-05-14 15:25 ` Pankaj Gupta
2019-05-15 20:46 ` Dan Williams
2019-05-15 20:46 ` Dan Williams
2019-05-15 20:46 ` Dan Williams
2019-05-15 20:46 ` Dan Williams
2019-05-15 20:46 ` David Hildenbrand
2019-05-15 20:46 ` [Qemu-devel] " David Hildenbrand
2019-05-15 20:46 ` David Hildenbrand
2019-05-15 20:52 ` David Hildenbrand
2019-05-15 20:52 ` [Qemu-devel] " David Hildenbrand
2019-05-16 7:54 ` Pankaj Gupta
2019-05-16 7:54 ` Pankaj Gupta
2019-05-16 7:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-16 7:54 ` Pankaj Gupta
2019-05-15 20:52 ` David Hildenbrand
2019-05-16 7:49 ` Pankaj Gupta
2019-05-16 7:49 ` [Qemu-devel] " Pankaj Gupta
2019-05-16 7:49 ` Pankaj Gupta
2019-05-16 7:49 ` Pankaj Gupta
2019-05-16 13:59 ` Michael S. Tsirkin
2019-05-16 13:59 ` [Qemu-devel] " Michael S. Tsirkin
2019-05-16 13:59 ` Michael S. Tsirkin
2019-05-17 5:31 ` [Qemu-devel] " Pankaj Gupta
2019-05-17 5:31 ` Pankaj Gupta
2019-05-17 5:31 ` Pankaj Gupta
2019-05-17 5:31 ` Pankaj Gupta
2019-05-16 13:59 ` Michael S. Tsirkin
2019-05-17 0:12 ` Jakub Staroń via Virtualization
[not found] ` <20190514145422.16923-3-pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-05-17 0:12 ` Jakub Staroń
2019-05-17 0:12 ` [Qemu-devel] " Jakub Staroń via Qemu-devel
2019-05-17 0:12 ` Jakub Staroń
2019-05-17 5:35 ` [Qemu-devel] " Pankaj Gupta
2019-05-17 5:35 ` Pankaj Gupta
2019-05-17 5:35 ` Pankaj Gupta
2019-05-17 5:35 ` Pankaj Gupta
2019-05-18 1:10 ` Jakub Staroń via Virtualization
2019-05-18 1:10 ` Jakub Staroń
2019-05-18 1:10 ` Jakub Staroń via Qemu-devel
2019-05-18 1:10 ` Jakub Staroń
2019-05-20 3:46 ` Pankaj Gupta
2019-05-20 3:46 ` Pankaj Gupta
2019-05-20 3:46 ` Pankaj Gupta
2019-05-20 3:46 ` Pankaj Gupta
2019-05-20 3:47 ` Pankaj Gupta
2019-05-20 3:47 ` Pankaj Gupta
2019-05-20 3:47 ` Pankaj Gupta
2019-05-20 3:47 ` Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [PATCH v9 3/7] libnvdimm: add dax_dev sync flag Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [PATCH v9 4/7] dm: enable synchronous dax Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-15 20:48 ` Dan Williams
2019-05-15 20:48 ` Dan Williams
2019-05-15 20:48 ` [Qemu-devel] " Dan Williams
2019-05-15 20:48 ` Dan Williams
2019-05-15 20:48 ` Dan Williams [this message]
2019-05-14 14:54 ` [PATCH v9 5/7] dax: check synchronous mapping is supported Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [PATCH v9 6/7] ext4: disable map_sync for async flush Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [PATCH v9 7/7] xfs: " Pankaj Gupta
2019-05-14 14:54 ` Pankaj Gupta
2019-05-14 14:54 ` [Qemu-devel] " Pankaj Gupta
2019-05-14 14:54 ` 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='CAPcyv4jp+9eBQMX+KXhT1oZRkxLeCp9r9g9hFUCRw=OcuQ9wmQ__27344.6264838398$1557953364$gmane$org@mail.gmail.com' \
--to=dan.j.williams@intel.com \
--cc=aarcange@redhat.com \
--cc=adilger.kernel@dilger.ca \
--cc=cohuck@redhat.com \
--cc=dave.jiang@intel.com \
--cc=david@fromorbit.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=jstaron@google.com \
--cc=kilobyte@angband.pl \
--cc=kvm@vger.kernel.org \
--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=pagupta@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riel@surriel.com \
--cc=snitzer@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=vishal.l.verma@intel.com \
--cc=willy@infradead.org \
--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 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.