Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3889875yba; Tue, 7 May 2019 08:37:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3WiSZKB4cwBusuAGdcQ1pfoEDWFP8syy6T7s3sKlYlS1vInd0vQeA5XA3SGwwjykmvC/i X-Received: by 2002:a65:430a:: with SMTP id j10mr15015233pgq.133.1557243460617; Tue, 07 May 2019 08:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557243460; cv=none; d=google.com; s=arc-20160816; b=jwq4+1609CbRkhHSVCzzk+WfmRy0j8y6sMbZ549fyjmhVBJK/PQg7SxoaD6oTbynj+ 2G0S5sHWiNOy+TF4dLhngXivZhuBbFpp8SoBpWyWONU3h75efiRDaySkfSU8jLgiuM0Z 2ao46fGdEhCCSDu7HMOWJMd83xhOkLNrcwKFwExXi0Mhn2SDrsBCEmQw+b0groXHbFmb Tk+BK69PZTYu+TnexlNFRGIySH8KPaRJOAhliePaZ7VGylHAdyoFVvW7EODq+2QMnHJ0 +TdDVfMkXfnzX72Aqyv6Oc7V/pMPX1ht+Gsp5jqLFliZFlADDhfILu721C1+XJ1Cv3bS DwUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6dOaY+uD9DJjErKzQ4lbx3sa2d0JDi7CHezoB5wTbvY=; b=Hxy4AuAGs1DaREHa/Got2lgj5rSi8oWp/aGiIjnQ9TCl82DLFHlRY97rv8s88hrcCB 73QdVXercJhcskN+oJfK+EsYxGwWX5GPhFTCaAOs6McOyf/ru82umB50CAnoJ727JUD+ H4P/PWwNj6cU5g2VtRox+4DORZZk4HaNGiH+1ub1x3znjip1mtrLvtpB7t2kITQ+ShGo ojX6q2EnBspEUik4WOWjwtSbjJF1s0PyIbIx45GNo1YOwQyoeIqCFL1Di8sUgdlCyXe4 Ttia3eBqEijaRgFkSz/z/gcsIqLU/I6xxBluYQoF4F8f2zXuOXXI2O/FVU9ASa35wamS x1fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=1RDaQiep; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si18781074plk.125.2019.05.07.08.37.24; Tue, 07 May 2019 08:37:40 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=1RDaQiep; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726852AbfEGPhN (ORCPT + 99 others); Tue, 7 May 2019 11:37:13 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:35503 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726844AbfEGPhN (ORCPT ); Tue, 7 May 2019 11:37:13 -0400 Received: by mail-ot1-f67.google.com with SMTP id g24so15371360otq.2 for ; Tue, 07 May 2019 08:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6dOaY+uD9DJjErKzQ4lbx3sa2d0JDi7CHezoB5wTbvY=; b=1RDaQiep4r+5NZ7RO5zftr0FnsMUZwAyLWkMBkR9iTDOBSIJayhPK4u9DWG7+9yxpt 9FJnbG3lrhIL0LedEM5ytUIEEGfVVBYdsCV16Q3ZevH87Y7p3IJljktvzFGtbrtOW9jV qgMeHUIAfkrXfVgCh+wJIUgLwx8HPs0Hso14g3nE34tG3uE5Kaf93v1albOqeZ8FtzEo MRnNU+jjU7Bd7Hg2HKOClTmC45crVs8w8TurxKr/6z1WENdYw/y//CLDQEQmIA9Rf7i+ OKLRLxxsnQvga0Mn1E5gFobavHOZ9OlvYblRdklzqgaUM3FSIzUzMZWnI38rOf5/Ueyc SI6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6dOaY+uD9DJjErKzQ4lbx3sa2d0JDi7CHezoB5wTbvY=; b=fhKRcHQnivfd8p1c9yAgwDhIE5t5vCrWtk3z02Ll2OHljwNnfOHK8FJP736aMToGxi HczhJzcIWOht4c6vJ6jJ3E0699EsM8g1OEvZDH8MhKKzVMqwE5rPKU1lkj+7EGWbOqI9 u6GVRgqO/zxKLSFZP2Mq7jn8ro18WvKDpKgI00cLh+kfuZcUrdEZTQCDtUqiY8hxEAsm DlQEXkuvYp8rLJZv20EEUwb/6b+tyhogV2aJ/qVgYP9DV3KttBZPWMj8iVHZFOOujmDn nUsi0Lw5etOHOHhrcOW03pn81Nux2WSZvF/yY2L8LXDz6w8aC3GDxtwuKwx5r+yN14b+ m9DA== X-Gm-Message-State: APjAAAUftmtyjrPI/hu0QZPHTomzURqnIRCGM4r8PmaoY15pt1vS0QQu AwRO1hlSAyQqq67OVAD6ky1TFyixkuAAMbhB31TAiw== X-Received: by 2002:a9d:222c:: with SMTP id o41mr22019501ota.353.1557243432435; Tue, 07 May 2019 08:37:12 -0700 (PDT) MIME-Version: 1.0 References: <20190426050039.17460-1-pagupta@redhat.com> <20190426050039.17460-7-pagupta@redhat.com> In-Reply-To: <20190426050039.17460-7-pagupta@redhat.com> From: Dan Williams Date: Tue, 7 May 2019 08:37:01 -0700 Message-ID: Subject: Re: [PATCH v7 6/6] xfs: disable map_sync for async flush To: Pankaj Gupta 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 , kilobyte@angband.pl, yuval shaia Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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? > > 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; > > file_accessed(filp); > -- > 2.20.1 >