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=-7.0 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 3F44BC10F13 for ; Thu, 11 Apr 2019 15:39:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1897C2083E for ; Thu, 11 Apr 2019 15:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726826AbfDKPjQ (ORCPT ); Thu, 11 Apr 2019 11:39:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36356 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbfDKPjP (ORCPT ); Thu, 11 Apr 2019 11:39:15 -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 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 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> Subject: Re: [PATCH v5 3/6] libnvdimm: add dax_dev sync flag 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) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 >