lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 31 May 2019 23:28:56 -0700 From: Dan Williams <dan.j.williams@...el.com> To: Pankaj Gupta <pagupta@...hat.com> Cc: linux-nvdimm <linux-nvdimm@...ts.01.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, virtualization@...ts.linux-foundation.org, KVM list <kvm@...r.kernel.org>, linux-fsdevel <linux-fsdevel@...r.kernel.org>, Linux ACPI <linux-acpi@...r.kernel.org>, Qemu Developers <qemu-devel@...gnu.org>, linux-ext4 <linux-ext4@...r.kernel.org>, linux-xfs <linux-xfs@...r.kernel.org>, device-mapper development <dm-devel@...hat.com>, Ross Zwisler <zwisler@...nel.org>, Vishal L Verma <vishal.l.verma@...el.com>, Dave Jiang <dave.jiang@...el.com>, "Michael S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>, Matthew Wilcox <willy@...radead.org>, "Rafael J. Wysocki" <rjw@...ysocki.net>, Christoph Hellwig <hch@...radead.org>, Len Brown <lenb@...nel.org>, Jan Kara <jack@...e.cz>, "Theodore Ts'o" <tytso@....edu>, Andreas Dilger <adilger.kernel@...ger.ca>, "Darrick J. Wong" <darrick.wong@...cle.com>, lcapitulino@...hat.com, Kevin Wolf <kwolf@...hat.com>, Igor Mammedov <imammedo@...hat.com>, jmoyer <jmoyer@...hat.com>, Nitesh Narayan Lal <nilal@...hat.com>, Rik van Riel <riel@...riel.com>, Stefan Hajnoczi <stefanha@...hat.com>, Andrea Arcangeli <aarcange@...hat.com>, David Hildenbrand <david@...hat.com>, david <david@...morbit.com>, cohuck@...hat.com, Xiao Guangrong <xiaoguangrong.eric@...il.com>, Paolo Bonzini <pbonzini@...hat.com>, yuval shaia <yuval.shaia@...cle.com>, Adam Borowski <kilobyte@...band.pl>, jstaron@...gle.com, Randy Dunlap <rdunlap@...radead.org>, Mike Snitzer <snitzer@...hat.com> Subject: Re: [PATCH v10 4/7] dm: enable synchronous dax On Tue, May 21, 2019 at 6:43 AM Pankaj Gupta <pagupta@...hat.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@...hat.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; Looks like this needs to be rebased on the current state of v5.2-rc, and then we can nudge Mike for an ack.
Powered by blists - more mailing lists