Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5935512yba; Thu, 11 Apr 2019 08:41:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqylGLn1BOBVl/9F2P7JxN3aBrql9f/5etW9GLZ/rAyWzbdewSttduflUO4vftE59qoM6Qmf X-Received: by 2002:a63:115c:: with SMTP id 28mr18659044pgr.270.1554997295119; Thu, 11 Apr 2019 08:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554997295; cv=none; d=google.com; s=arc-20160816; b=b0t0F3CZHhP5wx3AwkQIb75OsTrAoAnwG9sVA/FE2zBcOx+KfAJ8p2XIroiIqpFPeg zE2VmcGBnkWkP1AZ6DwHcxe/UEWPclWEJPq5wsAhplKwMFPgmGlHyXXIMjfRRwES16LV hOMvurDrpAk4mUeSeNTYxDkasWpSvQxrln+k0Z0B5FiYCG09r42CYozr6cypUUrW7B9q +DVYZcxXq5nPZTq8IjQqVB/KlAaioXgLGBaIojMNR8iFfnc2Ei36tqCtLd+qo1ZTvHsl tnkGYHoBKxLPlH8UcmN2N31VfDo3AnNpUdyohBrEYO+uLBd0LlwhHNrVOki0dY4Yz4Uu EXZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=TN/ja61Eazrqz/lYmNzzhXe1agr8T9HKX+j9mtaLObY=; b=DaPvNJi+P3cQ0KIqfr1gIOtksmmBDPDT/aUZob8b05VJK7EsfQmc5CMIjfYjMIHPGI r1t5GNfjlhZEI7plAGomzdzf2tG8eEnYrR1VvPgT5v5EPyyFX9FnSPRdAOSzWeKueBmx a8E2pDNIRpILaLvj0NPF8HBHEiSHYp/a1Hdl8tNfodSbs6EWiZruHbplDBETEiKMvinN vZt26wKBAKCIRVCSjynfdMERzTMTvG7oB+PjYV9EwoZ1ylU7m+/YuTYgmMgFFNdx4z4X gWMUy7+kf3cM5diixPVzRnW8MIFDOo0GS7DL9pzq6HGG+h93Gw4+Jq1Bn99uFu2Ooqsr Lmkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 77si23151231pft.72.2019.04.11.08.41.19; Thu, 11 Apr 2019 08:41:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726877AbfDKPjQ (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 >