From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BA18C468BC for ; Mon, 10 Jun 2019 05:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1A1A20820 for ; Mon, 10 Jun 2019 05:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728258AbfFJFIY (ORCPT ); Mon, 10 Jun 2019 01:08:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40636 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726913AbfFJFIY (ORCPT ); Mon, 10 Jun 2019 01:08:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A5623082E55; Mon, 10 Jun 2019 05:08:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E83C15B684; Mon, 10 Jun 2019 05:08:22 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1D91C206D1; Mon, 10 Jun 2019 05:08:21 +0000 (UTC) Date: Mon, 10 Jun 2019 01:08:20 -0400 (EDT) From: Pankaj Gupta To: Dan Williams Cc: linux-nvdimm , Linux Kernel Mailing List , virtualization@lists.linux-foundation.org, KVM list , linux-fsdevel , Linux ACPI , Qemu Developers , linux-ext4 , linux-xfs , device-mapper development , Ross Zwisler , Vishal L Verma , Dave Jiang , "Michael S. Tsirkin" , Jason Wang , Matthew Wilcox , "Rafael J. Wysocki" , Christoph Hellwig , Len Brown , Jan Kara , Theodore Ts'o , Andreas Dilger , "Darrick J. Wong" , lcapitulino@redhat.com, Kevin Wolf , Igor Mammedov , jmoyer , Nitesh Narayan Lal , Rik van Riel , Stefan Hajnoczi , Andrea Arcangeli , David Hildenbrand , david , cohuck@redhat.com, Xiao Guangrong , Paolo Bonzini , yuval shaia , Adam Borowski , jstaron@google.com, Randy Dunlap , Mike Snitzer Message-ID: <1533125860.33764157.1560143300908.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20190521133713.31653-1-pagupta@redhat.com> <20190521133713.31653-5-pagupta@redhat.com> Subject: Re: [PATCH v10 4/7] dm: enable synchronous dax MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.16, 10.4.195.3] Thread-Topic: enable synchronous dax Thread-Index: bfiNCXycvh8K7TR5aXllhHNvtwio0w== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 10 Jun 2019 05:08:24 +0000 (UTC) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org > On Tue, May 21, 2019 at 6:43 AM Pankaj Gupta 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 > > --- > > 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. Sorry! for late reply due to vacations. I will rebase the series on v5.2-rc4 and send a v11. Thanks, Pankaj Yes, >