Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2722733yba; Fri, 10 May 2019 17:47:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUIbvRlYjNhCXMj4QaGM88WdGE63vKHtvi3/bwXSG+CbCfU2PLlxIS2FND3+T1hagYu++Y X-Received: by 2002:a65:4183:: with SMTP id a3mr16944465pgq.121.1557535663456; Fri, 10 May 2019 17:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557535663; cv=none; d=google.com; s=arc-20160816; b=thPEKuCa5XUe8vzXrgYVwGYFeUYg3yYpA3GSgalNhb/AF0j0TRF0SkYkWWvNrEq7Gy tx7vSUqP1nt+Gj9uVEzsEtF10yra3qwiNdy5BB0BMWgCWn5p/1KaL5RZjWMeiPjq1oCG rvCj1oy7/YBrexRbBTOAeLH07G13175k48I1Xuy+X8Qq7Mp86qGt+ni/c59mMnq7xrrF SzagG0DnVTlQZKwrJvmQgApsakt28vZHSReA8coBotUZnEX/l4ndgGabYaAIIyG6h0UE Z/DwqJkHqLYUt74MVFJBDQrRZrckHzvjwK68QSSDxSiCARsRI5RX7Dbb2uMxHFAL8Xgl 14OA== 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=2Fl5F8Mhm6X68jbarzTdxK3wVRv4RuBidsBj6/ia9HY=; b=itenhr8PnUhX36uw9G4nptzQ8WtyBL3Gm/8PbpvqZ1TGstsdDPG9Z/TndS17KA/EqX XiXE1txUWQW0cKvn8gJFaGg3bG20dzmZv4IuILpWnHsE6qBqo5Yi6q3h+ISEAR2ODI4E Kt0nSW1F/C0RjWLESU7sjY8q1LLfiXKTiB8sv9YhpDNBhVhvGEXEzncoF8+m+N2KqPW4 NvdP6WnrD2RVre41hF5Yz+9VVej0TGCEmyDJPAG+JbsHjh7do7ABJgDB8Oe93/3zVhNK KXOnt7NNCrhGtrya1kml3Fc6Mqv7Z6Vx+zEmt0jRFfUEgEcTpiBt9ZFpVwZKCqtL1aqV wt2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 v7si9159929pgs.387.2019.05.10.17.47.18; Fri, 10 May 2019 17:47:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 S1728208AbfEKApw (ORCPT + 99 others); Fri, 10 May 2019 20:45:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38628 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727961AbfEKApv (ORCPT ); Fri, 10 May 2019 20:45:51 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 264E2DF23; Sat, 11 May 2019 00:45:51 +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 D99122CFE6; Sat, 11 May 2019 00:45:50 +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 3309B41F56; Sat, 11 May 2019 00:45:50 +0000 (UTC) Date: Fri, 10 May 2019 20:45:49 -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 , Adam Borowski , yuval shaia , jstaron@google.com Message-ID: <864186878.28040999.1557535549792.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20190510155202.14737-1-pagupta@redhat.com> <20190510155202.14737-4-pagupta@redhat.com> Subject: Re: [PATCH v8 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.14, 10.4.195.12] Thread-Topic: libnvdimm: add dax_dev sync flag Thread-Index: gVGO0BoaDll3U20KXC407XNgj3ThLg== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 11 May 2019 00:45:51 +0000 (UTC) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > > > > 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 | 3 ++- > > drivers/nvdimm/pmem.c | 5 ++++- > > drivers/nvdimm/region_devs.c | 7 +++++++ > > include/linux/dax.h | 8 ++++++-- > > include/linux/libnvdimm.h | 1 + > > 7 files changed, 33 insertions(+), 6 deletions(-) > [..] > > diff --git a/drivers/md/dm.c b/drivers/md/dm.c > > index 043f0761e4a0..ee007b75d9fd 100644 > > --- a/drivers/md/dm.c > > +++ b/drivers/md/dm.c > > @@ -1969,7 +1969,8 @@ static struct mapped_device *alloc_dev(int minor) > > sprintf(md->disk->disk_name, "dm-%d", minor); > > > > if (IS_ENABLED(CONFIG_DAX_DRIVER)) { > > - dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops); > > + dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops, > > + DAXDEV_F_SYNC); > > Apologies for not realizing this until now, but this is broken. > Imaging a device-mapper configuration composed of both 'async' > virtio-pmem and 'sync' pmem. The 'sync' flag needs to be unified > across all members. I would change this argument to '0' and then > arrange for it to be set at dm_table_supports_dax() time after > validating that all components support synchronous dax. o.k. Need to set 'DAXDEV_F_SYNC' flag after verifying all the target components support synchronous DAX. Just a question, If device mapper configuration have composed of both virtio-pmem or pmem devices, we want to configure device mapper for async flush? Thank you, Pankaj >