Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4096993yba; Tue, 23 Apr 2019 15:14:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQyuKNUmcW6fV59WWQOzF/GHKVo+Aq+i+nVnqZgLPLg+v+6JrKfefDCSRDBLEWmBXdBr7c X-Received: by 2002:a17:902:b602:: with SMTP id b2mr28763549pls.293.1556057648420; Tue, 23 Apr 2019 15:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556057648; cv=none; d=google.com; s=arc-20160816; b=eWerBFBOd8frD1zYOGOEKYpYM93YTkOx9bgzR46CsWz0T++z83jJ8snCWvX/rofJab yt1rHj1T9vpYXMdKHqn6o1zqGP5YFDzl7EA2YnniCR4iXU3GV+in7Wzx/Tx0tRe/tPbZ 6sl45hV/ty8FKCPcvYatQPIBSXrG87hncEku0mHe4mZvddOEiYoEsTMmFATnvklwHNYt 41N65jTksh6jSZMOBOF/IRk7ELoeqyaIHhwGJJp2WtAPzb0mRdjMuNTvpjyOVrnEmuRo vKz1tuiTWZVqYtKOdaE5HGmRiAXws01yHa72vcrUQNHkIeH/I7y3g8tawiyJQDJv67Cc fODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=l0VzuwK7fWj7U7YTxx4jiGO26nwCCDX522qiPNeC+/Y=; b=z+webfcHS5Hevha9Sq2Ct7KvQWM5UhXHjG1anDbkV8pnRHMsg3naftRDzZws4BfrDw F552duUkRCPGrN7hQptwPHQe3XJxrfQ1HNS2JBEOvPlcbZyv7CS0qt2LKMdzwXMgWP3G LW91b7qGsWQX4Ta6BIXajNLvJRK+VE3CdZ4rjUhDjY6Z4A05gajRlIwQbOXJ5JlwiOER 59SqWOF5PSsQhui/yIv9LgWhj0/3AQXwO11mdzVquLSlFTQ3xZFro4ygbQXFQSVJiGgz mACBrP81wrth5PaeNtxqN7ytOUG8Vl15NWoAUVrmjZ1lfIAMEZjzFsUHX0ngy1TlVStm ZKyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=AhdCKmBV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si16180261pgh.113.2019.04.23.15.13.53; Tue, 23 Apr 2019 15:14:08 -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=@oracle.com header.s=corp-2018-07-02 header.b=AhdCKmBV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728536AbfDWWM0 (ORCPT + 99 others); Tue, 23 Apr 2019 18:12:26 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:43272 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbfDWWM0 (ORCPT ); Tue, 23 Apr 2019 18:12:26 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3NM4iVc124778; Tue, 23 Apr 2019 22:10:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=l0VzuwK7fWj7U7YTxx4jiGO26nwCCDX522qiPNeC+/Y=; b=AhdCKmBVc8BIdraythvZytA3kVTqYzt3V1UvkKa8Xfe7HC6YDSnfPPTDrmy/WFLKpdLi ybqnDXcxozLtDQZSJb/CyE/DswT9j6XDoINpoqLbd6fOf2weWsI9t9Vt+ibJCOhqPJzw zGO2+HapNtynOsBUnzXoIU6Pc/S2ZpFJ3nH0vY8pOzQxRYNAIzglWCXbOjBv1lu+6J+7 ySjy/HIHmQFoQfRXMyTRrFIvGvIeczjvrUJP4emcLz7EwfM87kUd7rVf3KgiZCVQFjSy FjbRSFpgfPWnPRLuDOYrsPj2Y3KqDGi6HU6LDXE9hYrQP/SLd8jpFIC+4tXpBOwTFwR3 Qw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2ryv2q6uyp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Apr 2019 22:10:24 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3NM8hPQ066650; Tue, 23 Apr 2019 22:10:24 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2s0dwegm54-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Apr 2019 22:10:24 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x3NMAFaf014717; Tue, 23 Apr 2019 22:10:15 GMT Received: from localhost (/10.145.179.89) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 23 Apr 2019 15:10:15 -0700 Date: Tue, 23 Apr 2019 15:10:11 -0700 From: "Darrick J. Wong" To: Pankaj Gupta Cc: Dave Chinner , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-acpi@vger.kernel.org, qemu-devel@nongnu.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, dan.j.williams@intel.com, zwisler@kernel.org, vishal.l.verma@intel.com, dave.jiang@intel.com, mst@redhat.com, jasowang@redhat.com, willy@infradead.org, rjw@rjwysocki.net, hch@infradead.org, lenb@kernel.org, jack@suse.cz, tytso@mit.edu, adilger.kernel@dilger.ca, lcapitulino@redhat.com, kwolf@redhat.com, imammedo@redhat.com, jmoyer@redhat.com, nilal@redhat.com, riel@surriel.com, stefanha@redhat.com, aarcange@redhat.com, david@redhat.com, cohuck@redhat.com, xiaoguangrong.eric@gmail.com, pbonzini@redhat.com, yuval.shaia@oracle.com, kilobyte@angband.pl Subject: Re: [PATCH v6 6/6] xfs: disable map_sync for async flush Message-ID: <20190423221011.GD178290@magnolia> References: <20190423080612.15361-1-pagupta@redhat.com> <20190423080612.15361-7-pagupta@redhat.com> <20190423220217.GA29573@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423220217.GA29573@dread.disaster.area> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9236 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904230157 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9236 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904230157 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 08:02:17AM +1000, Dave Chinner wrote: > On Tue, Apr 23, 2019 at 01:36:12PM +0530, Pankaj Gupta wrote: > > Dont support 'MAP_SYNC' with non-DAX files and DAX files > > with asynchronous dax_device. Virtio pmem provides > > asynchronous host page cache flush mechanism. We don't > > support 'MAP_SYNC' with virtio pmem and xfs. > > > > Signed-off-by: Pankaj Gupta > > --- > > fs/xfs/xfs_file.c | 10 ++++++---- > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c > > index 1f2e2845eb76..0e59be018511 100644 > > --- a/fs/xfs/xfs_file.c > > +++ b/fs/xfs/xfs_file.c > > @@ -1196,11 +1196,13 @@ xfs_file_mmap( > > struct file *filp, > > struct vm_area_struct *vma) > > { > > - /* > > - * We don't support synchronous mappings for non-DAX files. At least > > - * until someone comes with a sensible use case. > > + struct dax_device *dax_dev = xfs_find_daxdev_for_inode > > + (file_inode(filp)); tab separation here ^^^ ^^^^ and cut down the indent while you're at it, please: struct dax_device *dax_dev; dax_dev = xfs_find_daxdev_for_inode(file_inode(filp)); if (!dax_is_frobbed(dax)) return -EMEWANTCOOKIE; --D > > + > > + /* We don't support synchronous mappings for non-DAX files and > > + * for DAX files if underneath dax_device is not synchronous. > > */ > > /* > * This is the correct multi-line comment format. Please > * update the patch to maintain the existing comment format. > */ > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com