From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-f67.google.com ([209.85.210.67]:44785 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726577AbfDKO4r (ORCPT ); Thu, 11 Apr 2019 10:56:47 -0400 Received: by mail-ot1-f67.google.com with SMTP id d24so5456197otl.11 for ; Thu, 11 Apr 2019 07:56:47 -0700 (PDT) MIME-Version: 1.0 References: <20190410040826.24371-1-pagupta@redhat.com> <20190410040826.24371-4-pagupta@redhat.com> In-Reply-To: <20190410040826.24371-4-pagupta@redhat.com> From: Dan Williams Date: Thu, 11 Apr 2019 07:56:36 -0700 Message-ID: Subject: Re: [PATCH v5 3/6] libnvdimm: add dax_dev sync flag Content-Type: text/plain; charset="UTF-8" Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Pankaj Gupta 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@oracle.com On Tue, Apr 9, 2019 at 9:10 PM Pankaj Gupta wrote: > > 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);