Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1339572yba; Thu, 4 Apr 2019 08:51:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTv1FkY3MvOyhaoUq9XGXjZCPZcybwqhyEnrmb50T20UEKDIgQx9rIijxNA3hajnQRpTq4 X-Received: by 2002:a17:902:2963:: with SMTP id g90mr7151495plb.182.1554393063981; Thu, 04 Apr 2019 08:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554393063; cv=none; d=google.com; s=arc-20160816; b=G/CrDv1/qdl5g0hERs93CzWYz2TZmtcngQ2HeRAXBv4hSfbQw4EKDnGe0Do0Rgm4Gl 0LBPG7qHOg9Z6i0scYgbsfFM7wthzNVjUw/u0T18sOEqCVyC5mbX3JxGfoOXsqkMiBYx 6vUNS4jXky9X23sSpq8lVRzAo/Y3b0Q0astvQkO2xIHQiCvoSyNEOJimzMb3oFQRMerc 2n6YZgTKitd3sEO+xFeWijGdIw+UqwOavbtysNBGJfb+xtsFiGfvAo7/cMM7T87qdW4u LqulTLE5nkkJvdK0i1Zr9Hwp6xiPTAFK3BJmUPSGkcPF/VmK2UEJCw+dFJ26GmgsUQTc 9aLw== 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=x+iLcaR8XY5ITb8xZQLGXl5F3pMCwvRadUoiNtkr0Qk=; b=biGxCRxLs8GLCJT4+GQHJMteDk5ZZJ46vqqDYAaoVLUoG8U9/yNbCcoRYr83fv/Io5 iv84THY2AGN7UUvgQMwqJKU00AjZ+ycCAk6LgNrk9YMX2hFTnwYGocIqo+P3jhYK/BQK gU1y8aMdNO2w25/iW/QnBS1B1SX4cApzZz+ClTjGEfgNXz5gA6bTKIb11zSO4mnBdXbn ha5Mp47EXPFCVX8is0OSp3OSV4CXSPtkK4ND3h0QoeyMysljGfU59wHFeKqxXSfZYvUb NRN1SKBweum+JePVXIE5AhkfSIA77KbRrvom7AGvtfR1ZynyRBncAHIbMYGZm0x1TjFy mW4w== 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 l62si8663048pgd.168.2019.04.04.08.50.48; Thu, 04 Apr 2019 08:51:03 -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 S1728925AbfDDPuF (ORCPT + 99 others); Thu, 4 Apr 2019 11:50:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37066 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbfDDPuF (ORCPT ); Thu, 4 Apr 2019 11:50:05 -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 AAFD0F74A7; Thu, 4 Apr 2019 15:50:04 +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 7AC8D84DBB; Thu, 4 Apr 2019 15:50:04 +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 2172941F3C; Thu, 4 Apr 2019 15:50:03 +0000 (UTC) Date: Thu, 4 Apr 2019 11:50:02 -0400 (EDT) From: Pankaj Gupta To: "Darrick J. Wong" Cc: Jan Kara , kvm@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, Dave Chinner , qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, adilger kernel , zwisler@kernel.org, aarcange@redhat.com, dave jiang , linux-nvdimm@lists.01.org, vishal l verma , david@redhat.com, willy@infradead.org, hch@infradead.org, linux-acpi@vger.kernel.org, jmoyer@redhat.com, linux-ext4@vger.kernel.org, lenb@kernel.org, riel@surriel.com, stefanha@redhat.com, dan j williams , lcapitulino@redhat.com, kwolf@redhat.com, nilal@redhat.com, tytso@mit.edu, xiaoguangrong eric , cohuck@redhat.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, imammedo@redhat.com Message-ID: <846216210.17971239.1554393002566.JavaMail.zimbra@redhat.com> In-Reply-To: <20190404150025.GN5147@magnolia> References: <20190403104018.23947-1-pagupta@redhat.com> <20190403220912.GB26298@dastard> <20190403223921.GM5147@magnolia> <1508883801.17367965.1554358418550.JavaMail.zimbra@redhat.com> <651986267.17402634.1554368950178.JavaMail.zimbra@redhat.com> <20190404094029.GD16131@quack2.suse.cz> <527416483.17415178.1554372524196.JavaMail.zimbra@redhat.com> <20190404150025.GN5147@magnolia> Subject: Re: [Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.57, 10.4.195.2] Thread-Topic: disable map_sync for async flush Thread-Index: 45nNyk/dhs+S+Tyhd4Ieg+M6TOhpwQ== 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.38]); Thu, 04 Apr 2019 15:50:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > > > So I would put the helper in include/linux/dax.h and have it like: > > > > > > bool daxdev_mapping_supported(struct vm_area_struct *vma, > > Should this be static inline if you're putting it in the header file? yes. Thanks. > > A comment ought to be added to describe what this predicate function > does. Sure, will add a comment describing the function. > > > > struct dax_device *dax_dev) > > > { > > > if (!(vma->vm_flags & VM_SYNC)) > > > return true; > > > if (!IS_DAX(file_inode(vma->vm_file))) > > > return false; > > > return dax_synchronous(dax_dev); > > > } > > > > Sure. This is much better. I was also not sure what to name the helper > > function. > > I will go ahead with this unless 'Dave' & 'Darrick' have anything to add. > > Jan's approach (modulo that one comment) looks good to me. Sure. Thank you. Best regards, Pankaj > > --D >