Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp30639ybl; Mon, 12 Aug 2019 11:09:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxReFVjeWhHT6HRWMIkq1rIkkfcbIq4QuwlOS5LGtezxYZn1ln8BXN5tYE68Wx++nrQ9mZY X-Received: by 2002:a17:902:f81:: with SMTP id 1mr33818448plz.191.1565633386625; Mon, 12 Aug 2019 11:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565633386; cv=none; d=google.com; s=arc-20160816; b=uWT6fFjyZZTcLReDnBmSaK+DczfrORwOcp0GEoeQyATn1XHr3IlOpjTQCrw77L1tYV QKKe5ZWWQ8/ubi2G7mPB9qTWFwRoBLsFmMyMnSta+RaF+663F7/CRmgT/HYqqFOxRWfe LIVD+rMQU9yfxFEJOr5uUuEah5g5rJ2xKN/F9pbo3JgwgCab2QpzUoh1MQc7l14arN1a muHY7XceRdAezYVHGLZboI7LjBo+jf2+V57TarM6PF9n1VtopeLwUK1CU9ClB+gB58Ua 1dSK7B5WvdFHGQjWB3//sjT9BTY217oKTnVLof29R2ljFiw3veMRzeMxl00YqYZ0Yyma ngXQ== 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; bh=dkHrRcwckigImaaPPdhnrISdJP+rJYNvHTRz11WFQa8=; b=Ry+0sFzGQEafDQrYR/0Tn5LuBpufoLpVpR2XFqSA7SFb11IgPowyqHgvukAwyqPFLj ezoHW8p0SZlMw3vVqEODgp+PmXtK7MhHwg7UPK4V6ZECuQvvYRN63qW8H1ogl/x/Ny4Y XzKntuDU7q6nh4f2RmMPmAXI5xthvFw/mYO9YKxgnl0N5mt5YPsYXVsmCU2Y/ye7284X mR6XYa3T0cleUGH+xf4uLqtfK8PhGpMWZE3uiwvkXSCdsXiiDCFXgC2FhOR+3BUc/Cc0 lxVlZYaoub6os+bSoDumOmSF/i6I7GWxL9X/b3kWqFK7z5KRAejCq4FzFZzqC9ZTGHbK sSGw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s19si62408397pgm.291.2019.08.12.11.09.30; Mon, 12 Aug 2019 11:09:46 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbfHLSIo (ORCPT + 99 others); Mon, 12 Aug 2019 14:08:44 -0400 Received: from mga01.intel.com ([192.55.52.88]:56925 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfHLSIn (ORCPT ); Mon, 12 Aug 2019 14:08:43 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 11:08:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,378,1559545200"; d="scan'208";a="175965853" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga008.fm.intel.com with ESMTP; 12 Aug 2019 11:08:42 -0700 Date: Mon, 12 Aug 2019 11:08:42 -0700 From: Ira Weiny To: Dave Chinner Cc: Andrew Morton , Jason Gunthorpe , Dan Williams , Matthew Wilcox , Jan Kara , Theodore Ts'o , John Hubbard , Michal Hocko , linux-xfs@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v2 08/19] fs/xfs: Fail truncate if page lease can't be broken Message-ID: <20190812180841.GD19746@iweiny-DESK2.sc.intel.com> References: <20190809225833.6657-1-ira.weiny@intel.com> <20190809225833.6657-9-ira.weiny@intel.com> <20190809232209.GA7777@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190809232209.GA7777@dread.disaster.area> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 10, 2019 at 09:22:09AM +1000, Dave Chinner wrote: > On Fri, Aug 09, 2019 at 03:58:22PM -0700, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > If pages are under a lease fail the truncate operation. We change the order of > > lease breaks to directly fail the operation if the lease exists. > > > > Select EXPORT_BLOCK_OPS for FS_DAX to ensure that xfs_break_lease_layouts() is > > defined for FS_DAX as well as pNFS. > > > > Signed-off-by: Ira Weiny > > --- > > fs/Kconfig | 1 + > > fs/xfs/xfs_file.c | 5 +++-- > > 2 files changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/fs/Kconfig b/fs/Kconfig > > index 14cd4abdc143..c10b91f92528 100644 > > --- a/fs/Kconfig > > +++ b/fs/Kconfig > > @@ -48,6 +48,7 @@ config FS_DAX > > select DEV_PAGEMAP_OPS if (ZONE_DEVICE && !FS_DAX_LIMITED) > > select FS_IOMAP > > select DAX > > + select EXPORTFS_BLOCK_OPS > > help > > Direct Access (DAX) can be used on memory-backed block devices. > > If the block device supports DAX and the filesystem supports DAX, > > That looks wrong. It may be... > > If you require xfs_break_lease_layouts() outside > of pnfs context, then move the function in the XFS code base to a > file that is built in. It's only external dependency is on the > break_layout() function, and XFS already has other unconditional > direct calls to break_layout()... I'll check. This patch was part of the original series and I must admit I don't remember why I did it this way... Thanks, Ira > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com