Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5532532yba; Mon, 13 May 2019 12:32:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqLdYEbEVFR7O75Ezepa6dpwYE1mpI6sjHT4ul8snpQu1rCf1+hTXDt55MjUyK7QF5uqTF X-Received: by 2002:a62:582:: with SMTP id 124mr36051806pff.209.1557775924847; Mon, 13 May 2019 12:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557775924; cv=none; d=google.com; s=arc-20160816; b=u1siNb3SVm3Lz1dbQ0Rxek/8+0z0yzjsm0RH7yJMYuqKpmYBV+b2oTswnpFf3iqWXF 4tesndlvme7RrMKc6yFqiUDNuIvGtX1KV4MDlDeDfIZNhqkH8GzQrG7AALHXFIJScgtQ ZLn36zuC/iHIxlbhlC9JDHEKFX03SOqYeZlzRxZj/yihmmEA2kVF7VEgevKz/yPB83h1 Za8Y/jZ4zhvE7BRQcGxMSxiwJphgpDjmS0ZeGQYxszekd/jFT/p4lapkXwQXXY0g1LaU xgU/RhXBFj8lBjAxEMV8jqu/WrOToDSzTaZolkJVDnxGta0jrR8jwFYJG1yXWirAyx3p w1cQ== 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=y/OsWzQVSF0LS9Pov76aIhtcrev3EuMrPoB3hzYsz8A=; b=yK9R9vvrAs5llkczdB7vLsUPMC6r9kyeNc0XFV+iXyETTI57dV8VOw1ekcQW18+pjb lZBACmP6vnn+YipYqvVKaQntuyuQrskQvl+hysYVKz10nMPBWF++VAmULl9RgR6CZBYn HcsBfNoEKw9rv3RkI9xovHaClUGP3XqdXZmcBsQ9S8eeNhLLUR0zEmaiY9HtxRJ6XzGJ TcwJL2cR8balngPmwl+3OJl56XsZN4N6sEGpLAfyb3MnO6P5k+3M+Gkbc4B+CDw7s1Lt 8SSDpOAQguQlxtfMHxQnC7Qy1zJkS0xT2UW2v1ziCwSkLoS6oZ8YKJCwZPqQmrmLuUXE HVrQ== 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 a15si6690219pfa.85.2019.05.13.12.31.45; Mon, 13 May 2019 12:32:04 -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 S1729047AbfEMRcl (ORCPT + 99 others); Mon, 13 May 2019 13:32:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42674 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728708AbfEMRck (ORCPT ); Mon, 13 May 2019 13:32:40 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EF1530832E3; Mon, 13 May 2019 17:32:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36EDE9CC8; Mon, 13 May 2019 17:32:33 +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 7495018089CA; Mon, 13 May 2019 17:32:28 +0000 (UTC) Date: Mon, 13 May 2019 13:32:28 -0400 (EDT) From: Pankaj Gupta To: Dan Williams Cc: cohuck@redhat.com, Jan Kara , KVM list , "Michael S. Tsirkin" , Jason Wang , david , Qemu Developers , virtualization@lists.linux-foundation.org, Andreas Dilger , Ross Zwisler , Andrea Arcangeli , Dave Jiang , jstaron@google.com, linux-nvdimm , Vishal L Verma , David Hildenbrand , Matthew Wilcox , Christoph Hellwig , Linux ACPI , jmoyer , linux-ext4 , Len Brown , Adam Borowski , Rik van Riel , yuval shaia , Stefan Hajnoczi , Paolo Bonzini , lcapitulino@redhat.com, Kevin Wolf , Nitesh Narayan Lal , Theodore Ts'o , Xiao Guangrong , "Darrick J. Wong" , "Rafael J. Wysocki" , Linux Kernel Mailing List , linux-xfs , linux-fsdevel , Igor Mammedov Message-ID: <116369545.28425569.1557768748009.JavaMail.zimbra@redhat.com> In-Reply-To: <2003480558.28042237.1557537797923.JavaMail.zimbra@redhat.com> References: <20190510155202.14737-1-pagupta@redhat.com> <20190510155202.14737-4-pagupta@redhat.com> <864186878.28040999.1557535549792.JavaMail.zimbra@redhat.com> <2003480558.28042237.1557537797923.JavaMail.zimbra@redhat.com> Subject: Re: [Qemu-devel] [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.65.16.148, 10.4.196.23, 10.5.101.130, 10.4.195.13] Thread-Topic: libnvdimm: add dax_dev sync flag Thread-Index: ptJfczfofLn7Sapjrtn0VT/vVA1TgWbBtP+u X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 13 May 2019 17:32:40 +0000 (UTC) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi Dan, While testing device mapper with DAX, I faced a bug with the commit: commit ad428cdb525a97d15c0349fdc80f3d58befb50df Author: Dan Williams Date: Wed Feb 20 21:12:50 2019 -0800 When I reverted the condition to old code[1] it worked for me. I am thinking when we map two different devices (e.g with device mapper), will start & end pfn still point to same pgmap? Or there is something else which I am missing here. Note: I tested only EXT4. [1] - if (pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX) + end_pgmap = get_dev_pagemap(pfn_t_to_pfn(end_pfn), NULL); + if (pgmap && pgmap == end_pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX + && pfn_t_to_page(pfn)->pgmap == pgmap + && pfn_t_to_page(end_pfn)->pgmap == pgmap + && pfn_t_to_pfn(pfn) == PHYS_PFN(__pa(kaddr)) + && pfn_t_to_pfn(end_pfn) == PHYS_PFN(__pa(end_kaddr))) dax_enabled = true; put_dev_pagemap(pgmap); Thanks, Pankaj