Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5893390yba; Thu, 11 Apr 2019 07:57:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZjb342fyXKX0lAnRv24McQf5uWJQg2RoBi6nLLACLwXsm2dDb3oQRJ4O8tpQMZS0kAzEs X-Received: by 2002:a62:4558:: with SMTP id s85mr50470225pfa.171.1554994662716; Thu, 11 Apr 2019 07:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554994662; cv=none; d=google.com; s=arc-20160816; b=d8VGyUCYq8bIdqDhCVmR6/+Ok1EVLbzSvvvj+xkQByW0IKwB74eaWpigGuvfyfJto7 x8eCrDmy0YTBh9Y+I26jlsoE+n0dyRzDcvvb8RQ+zLr6JxPgGTrFwuef01qNsPddsFVg mvgAoV7W8hE1gVBPZwkhRX0GCPjdnH6wZKplgexULWXMWg5bOEVS1QtiEh3DHS8oTnj6 rMZILxe6dJdh6qVxd7nezF4APEWHp+SkM8B0v/AOBLkK9n0FZYxENwJfJM4p1RtYZRel wktsMZMVf0+2ANiuX3CbqL76fT0E05yaiTHnlpvd87T+fgTkFQjq5YPzj9wU48SshM1h TtBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Q39WY1QwbNiopzjiE9clWXmypKuvpRyCVeYXAVT0ZNM=; b=CNP+GvGELMdT6433eY/0bKe9mEmbyGJ3NcDx2VHq6jiqHINtNdy6vPaAiPOIXjevfX Xow9UQPiaNizNqGZ1yutBQqoQLZLDQzyQKwEB+D+kCBziY7Lw1+CWgLv44l32hnWImWx xyCOx+yzhWdfFwnC6vOPhyYjA/nD53zI6a2uMQgwR076C1+U4j2jnhAwj2iU4Iig2vog gepyE/LqZoIkkdDaJWiAyQK2bt2+0BMN4qZfz4oz6M/E7lYAhZ8ZEHzjj1KCdH4IPdf2 Vg8vRbrV+fjOkfeQE++yRMC6An90Jya+PqMW3b8INDJTIOO8MPhpvjNesOJUf3DgPKCx GW7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Q3uBcTGn; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si34251122plr.229.2019.04.11.07.57.26; Thu, 11 Apr 2019 07:57:42 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Q3uBcTGn; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfDKO4s (ORCPT + 99 others); Thu, 11 Apr 2019 10:56:48 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:36091 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbfDKO4r (ORCPT ); Thu, 11 Apr 2019 10:56:47 -0400 Received: by mail-ot1-f68.google.com with SMTP id o74so5489372ota.3 for ; Thu, 11 Apr 2019 07:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q39WY1QwbNiopzjiE9clWXmypKuvpRyCVeYXAVT0ZNM=; b=Q3uBcTGnIjZa7/KTp2qiPOTYOZa2YOHA6wen6rcf4+KfoSQ0dYkzRF2BB3Hh9J2hV5 1WBEO7/TSq9DfFY0FU6SEBYDgiByc7D+9QK6Os47nmX4kd7vSs5p0pZVuhMDKFPnhkVp oD4wLyF6G1hd93q1lXUNEZYVQVdvlRk1We0zXgcvjD2Ot+YWI9AjPTndAx7YBokeV1fZ ctpp4sE7+T/qGAEjWerHgwvW+3YBraMDq/4HNGPh7AtRvvMtqu1zk5yP07hribDH8Jb+ nyZtJUGLAAxZcI9GzgiobzP4HXPPNL+stbL0F3dlu1oxNrRIZqBzxUp5n1X0A+I5ZFl8 B6zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q39WY1QwbNiopzjiE9clWXmypKuvpRyCVeYXAVT0ZNM=; b=PWBM2x9Zj6col8DPXI1cRAYBnffCrKS81Eg2b0ui7r45cgBJLcOzeSJ7dBKxA17dtH OpGp13ki86Lk4cgT8/MTT3SrS5VmwcDgGE6L+A4g+BopmT9WnYZESyTY97kKjnXHYCm/ SPtuL6ARX5eDkBTqJ7BfOMwEkavLADdirq+Emzg95ZxggAhajTQ3nIwKDH87r2X8hkdf UqUSLhVbTCQI2f6lZ6CWs4jvqIlmShQJ0nBlW+c+w5SWyH49pZ/Ez8u4x0DbitT0eieY nyEod8BuU1HQ6hxFCjZy5t9Kw0PDyS5rlBbCH3m0eCwVG3Z6D8n8vviMQLr9Pw0Rc+NT IGBw== X-Gm-Message-State: APjAAAVRni8pFB6+KfMAobVS/X2GY4q4Foj7FoVnrP5xeu2oDsStTItv ycXMbyPSWYIr+tVeaFkLdsEYCUBbi4qoQDWkwy6Rlw== X-Received: by 2002:a9d:6a88:: with SMTP id l8mr32863157otq.260.1554994607197; 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 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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);