Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3935679yba; Tue, 7 May 2019 09:20:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfB2jTgGKqA3DxE2FYvRd1GfwSDCcaX//gRMlwh1KBDj7Azw3vgSXXUM5MpIaRycAhH3d9 X-Received: by 2002:a17:902:364:: with SMTP id 91mr40074801pld.72.1557246009143; Tue, 07 May 2019 09:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557246009; cv=none; d=google.com; s=arc-20160816; b=aBNirWoyQWhHl8wL1EmaFELE0QQYr/D9qYMab2Z28V6CnaEmHiusIQ5okaVoGksO46 cbkXvuHbpNpMfvzLzc7WmBkunTpJrgYJkVVtATHvY0G1qmwFMauqzJC6vViNKwrIqEco l0gVI4Gz65ZvRr+GHHtFG0i0owhFVABRpzT/FvgSaXtXCpF43JnscqsRU5mLNFYyxvLg s1lgcYFGFELWFYTaSHcMXysirMJ4gW075r5WA/Q1v7UNEEWZUY3LF9eW8F83We4dsEIw dRPonOKuUl4UON1JMUb/8iE5gYfpWsL/N5ilRSKIzQPjP1nYz6Ct96hYAz0UsgB+hXOQ kTiw== 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=JFFlnWS0WxSMENUMsRBMs4+e/sfuzMFmGvWcjKKQQuc=; b=qaV59sXsAZ3/XS0XwNUG4KnssZ/BB2j0OrUsWL1RNnhvxVtm6wx2PTR4ed/U+cCw+c hGwOdFcvUDdPpMAPNNLOStS8EfKoTZ2ojGGv/gqXf55YJ4AB9cOx7rCp79yCiq8qozYV j9vMLQOEY/jzIb5Q9iXZKKtQAvLAFxAWHqTVe56wmsTC0QnA3bv4HgDq8fe7gve/Ekd8 OtSfL+v9gtW+AwPNgCPJvlWayAnvyV7KkldX2FbiDYDC/juJOSussIc1lK61J17IVBdS 0yy2sYx0ctKPORbphN8be6O7PwE0ZmQoTBsinvvGh/xcoxemr2/0yDMy8W85OLgLe2A1 WzPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=TKQ0ZY42; 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=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 f13si147203pga.385.2019.05.07.09.19.52; Tue, 07 May 2019 09:20:09 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=TKQ0ZY42; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726476AbfEGQTt (ORCPT + 99 others); Tue, 7 May 2019 12:19:49 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:48568 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfEGQTt (ORCPT ); Tue, 7 May 2019 12:19:49 -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 x47GE4tr157451; Tue, 7 May 2019 16:17:57 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=JFFlnWS0WxSMENUMsRBMs4+e/sfuzMFmGvWcjKKQQuc=; b=TKQ0ZY42TnZrA9kUXuIIQxHZJtlgsPZc/HUlXzQ4TUAvfAYUIXRd3TufRkYlIsL/qYnH gEOc/3eGhv+v8nTxOS8S21kRqbBtPYiYTEKBQBAnom75SF+6NN9JdMkr6m+iXE4suPUy M8pk/1FBF18jWlrv22JoleV2scB2kxIrjAnXvCYleCsCB2wshmO8nENxJSX0+PxVJUiQ ZYNWGbaeLaZaSTwok9d5T6R6aHykl/CLecrfPWn2A3d57LkaTuFX9ZNvyXgC4fQ28IyP l2LCbcZAeGQ6QNp9COGNfS/FdR1duRVLEebs8Og572/1EJwAKTyBze4/M2itosUoGBUM Pg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2s94b0phet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 May 2019 16:17:57 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x47GH2b6135005; Tue, 7 May 2019 16:17:56 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2s9ayeyus1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 May 2019 16:17:56 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x47GHiM0002137; Tue, 7 May 2019 16:17:44 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 May 2019 09:17:44 -0700 Date: Tue, 7 May 2019 09:17:36 -0700 From: "Darrick J. Wong" To: Dan Williams Cc: Pankaj Gupta , 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 , 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 Subject: Re: [PATCH v7 6/6] xfs: disable map_sync for async flush Message-ID: <20190507161736.GV5207@magnolia> References: <20190426050039.17460-1-pagupta@redhat.com> <20190426050039.17460-7-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9250 signatures=668686 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-1905070105 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9250 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 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-1905070105 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, May 07, 2019 at 08:37:01AM -0700, Dan Williams wrote: > On Thu, Apr 25, 2019 at 10:03 PM 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 | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > Darrick, does this look ok to take through the nvdimm tree? forgot about this, sorry. :/ > > > > diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c > > index a7ceae90110e..f17652cca5ff 100644 > > --- a/fs/xfs/xfs_file.c > > +++ b/fs/xfs/xfs_file.c > > @@ -1203,11 +1203,14 @@ xfs_file_mmap( > > struct file *filp, > > struct vm_area_struct *vma) > > { > > + struct dax_device *dax_dev; > > + > > + dax_dev = xfs_find_daxdev_for_inode(file_inode(filp)); > > /* > > - * We don't support synchronous mappings for non-DAX files. At least > > - * until someone comes with a sensible use case. > > + * We don't support synchronous mappings for non-DAX files and > > + * for DAX files if underneath dax_device is not synchronous. > > */ > > - if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > > + if (!daxdev_mapping_supported(vma, dax_dev)) > > return -EOPNOTSUPP; LGTM, and I'm fine with it going through nvdimm. Nothing in xfs-5.2-merge touches that function so it should be clean. Reviewed-by: Darrick J. Wong --D > > > > file_accessed(filp); > > -- > > 2.20.1 > >