From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:52531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEbnR-00010m-MW for qemu-devel@nongnu.org; Thu, 11 Apr 2019 11:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEbnQ-00085Q-PP for qemu-devel@nongnu.org; Thu, 11 Apr 2019 11:39:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42638) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEbnQ-0007wx-9d for qemu-devel@nongnu.org; Thu, 11 Apr 2019 11:39:24 -0400 Date: Thu, 11 Apr 2019 11:39:06 -0400 (EDT) From: Pankaj Gupta Message-ID: <393821092.21153045.1554997146416.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20190410040826.24371-1-pagupta@redhat.com> <20190410040826.24371-4-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 3/6] libnvdimm: add dax_dev sync flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 , 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 , kilobyte@angband.pl, yuval shaia Hi Dan, Thank you for the review. > > > > 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 > > --- > > drivers/dax/bus.c | 2 +- > > drivers/dax/super.c | 13 ++++++++++++- > > drivers/md/dm.c | 2 +- > > drivers/nvdimm/pmem.c | 3 ++- > > drivers/nvdimm/region_devs.c | 7 +++++++ > > include/linux/dax.h | 9 +++++++-- > > include/linux/libnvdimm.h | 1 + > > 7 files changed, 31 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > > index 2109cfe80219..431bf7d2a7f9 100644 > > --- a/drivers/dax/bus.c > > +++ b/drivers/dax/bus.c > > @@ -388,7 +388,7 @@ struct dev_dax *__devm_create_dev_dax(struct dax_region > > *dax_region, int id, > > * No 'host' or dax_operations since there is no access to this > > * device outside of mmap of the resulting character device. > > */ > > - dax_dev = alloc_dax(dev_dax, NULL, NULL); > > + dax_dev = alloc_dax(dev_dax, NULL, NULL, true); > > I find apis that take a boolean as unreadable. What does 'true' mean? > It wastes time to go look at the function definition vs something > like: > > alloc_dax(dev_dax, NULL, NULL, DAXDEV_F_SYNC); Agree. Will change as suggested. Best regards, Pankaj > 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.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 31A10C10F13 for ; Thu, 11 Apr 2019 15:47:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0219620818 for ; Thu, 11 Apr 2019 15:47:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0219620818 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:51053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEbvB-0007Vq-7B for qemu-devel@archiver.kernel.org; Thu, 11 Apr 2019 11:47:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEbnR-00010m-MW for qemu-devel@nongnu.org; Thu, 11 Apr 2019 11:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEbnQ-00085Q-PP for qemu-devel@nongnu.org; Thu, 11 Apr 2019 11:39:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42638) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEbnQ-0007wx-9d for qemu-devel@nongnu.org; Thu, 11 Apr 2019 11:39:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CE506308B232; Thu, 11 Apr 2019 15:39:14 +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 4DF405D961; Thu, 11 Apr 2019 15:39:10 +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 C61B741F3C; Thu, 11 Apr 2019 15:39:06 +0000 (UTC) Date: Thu, 11 Apr 2019 11:39:06 -0400 (EDT) From: Pankaj Gupta To: Dan Williams Message-ID: <393821092.21153045.1554997146416.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20190410040826.24371-1-pagupta@redhat.com> <20190410040826.24371-4-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.71, 10.4.195.19] Thread-Topic: libnvdimm: add dax_dev sync flag Thread-Index: c0h6aJgeiBnDRJuQUzBrBpkw3+vU/Q== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 11 Apr 2019 15:39:15 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-devel] [PATCH v5 3/6] libnvdimm: add dax_dev sync flag X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cohuck@redhat.com, Jan Kara , KVM list , "Michael S. Tsirkin" , Jason Wang , david , Qemu Developers , virtualization@lists.linux-foundation.org, Andreas Dilger , Ross Zwisler , Andrea Arcangeli , Dave Jiang , linux-nvdimm , Vishal L Verma , David Hildenbrand , Matthew Wilcox , Christoph Hellwig , Linux ACPI , jmoyer , linux-ext4 , Len Brown , kilobyte@angband.pl, Rik van Riel , yuval shaia , Stefan Hajnoczi , Paolo Bonzini , lcapitulino@redhat.com, Kevin Wolf , Nitesh Narayan Lal , Theodore Ts'o , Xiao Guangrong , "Darrick J. Wong" , "Rafael J. Wysocki" , Linux Kernel Mailing List , linux-xfs , linux-fsdevel , Igor Mammedov Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Message-ID: <20190411153906.yY_g0UK3A4nNSN66UJWhrzQeJQzBIX5LG5HQsqLrMXQ@z> Hi Dan, Thank you for the review. > > > > 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 > > --- > > drivers/dax/bus.c | 2 +- > > drivers/dax/super.c | 13 ++++++++++++- > > drivers/md/dm.c | 2 +- > > drivers/nvdimm/pmem.c | 3 ++- > > drivers/nvdimm/region_devs.c | 7 +++++++ > > include/linux/dax.h | 9 +++++++-- > > include/linux/libnvdimm.h | 1 + > > 7 files changed, 31 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > > index 2109cfe80219..431bf7d2a7f9 100644 > > --- a/drivers/dax/bus.c > > +++ b/drivers/dax/bus.c > > @@ -388,7 +388,7 @@ struct dev_dax *__devm_create_dev_dax(struct dax_region > > *dax_region, int id, > > * No 'host' or dax_operations since there is no access to this > > * device outside of mmap of the resulting character device. > > */ > > - dax_dev = alloc_dax(dev_dax, NULL, NULL); > > + dax_dev = alloc_dax(dev_dax, NULL, NULL, true); > > I find apis that take a boolean as unreadable. What does 'true' mean? > It wastes time to go look at the function definition vs something > like: > > alloc_dax(dev_dax, NULL, NULL, DAXDEV_F_SYNC); Agree. Will change as suggested. Best regards, Pankaj >