Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6907856ybp; Wed, 16 Oct 2019 00:25:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjzpvMICQM+LHpytYy4QK0QxEu3PGbCCXBuJXNaJm8zTA/BxodVsF+t0XpVpjQKxLvHqyX X-Received: by 2002:a50:c2c2:: with SMTP id u2mr38428158edf.133.1571210728851; Wed, 16 Oct 2019 00:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571210728; cv=none; d=google.com; s=arc-20160816; b=tYyYORiZE4cQLlLgBJmoTkUHIiNLWgH1yE2ITO13997TrM97d/tIuGcaIHETUdqTN/ Xtp7hPXnDXE1OZB/ZZ3nQkLvhrC8p+QEfR17OnGXCaRsyBkx/ezxwTJw2OHDU5bEDia7 TC7YTPI6M0BDDCEhD6uXywMNyJ+A97XM2DsmCNDJCPJNCImOuBfib7rS1QfgbREYK1GN P2z1TWOVXBX8Ww52gNL2vs5/UUWVhWba7gRjh5UVv1stSCAWJrDdH7i/LLZk+Ro65gY1 J4syrGXnb2y/0TWXksuXpsVRqhs4AaHleH/4zmQXs4aHfM3t8P3Qgva2bfbwqz7DAUP6 EBgA== 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=RLy6hcD+hkVTyJ6WVScf/9+t3XGC0pMryY6k6HIuYAs=; b=Sa66RLDEcEHQInsrSbi9KK91CEj5ZK7DK1cMzcP777UkNdVlY+mJNvyzFRG4OpTZKV PD9mqAK9TKYrootj76fTRDIm9tAdoqoGw4Gn3+WTDaCXcG/mWia50xJwkhA0JH/hceON rw0Gz6XR/n/Uhh8uLyAC1rU/kDnjcUPDZS3pHOYBxS8ltjtUzsV9lunvXmFI165hmaSV TXmE5vqu8tcEzVIWa5tBRt5lpDVK7NeygqsOvam6NgOTIm8oMAHCZS/8m5UNUJvL8sUa bD6jEtcQHx0dSDQOroApwiOd5iNMGtRFjPbuj7X748JNvhkwTSNjBfxl8nAtvLXe0eBV 8NWQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si14550915ejn.392.2019.10.16.00.25.05; Wed, 16 Oct 2019 00:25:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389091AbfJOWIc (ORCPT + 99 others); Tue, 15 Oct 2019 18:08:32 -0400 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:39432 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbfJOWIb (ORCPT ); Tue, 15 Oct 2019 18:08:31 -0400 Received: from dread.disaster.area (pa49-181-198-88.pa.nsw.optusnet.com.au [49.181.198.88]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 34DBF43E5E3; Wed, 16 Oct 2019 09:08:29 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.2) (envelope-from ) id 1iKUzU-00012u-8y; Wed, 16 Oct 2019 09:08:28 +1100 Date: Wed, 16 Oct 2019 09:08:28 +1100 From: Dave Chinner To: Christoph Hellwig Cc: "Darrick J . Wong" , Damien Le Moal , Andreas Gruenbacher , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/12] iomap: warn on inline maps in iomap_writepage_map Message-ID: <20191015220828.GD16973@dread.disaster.area> References: <20191015154345.13052-1-hch@lst.de> <20191015154345.13052-11-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191015154345.13052-11-hch@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=ocld+OpnWJCUTqzFQA3oTA==:117 a=ocld+OpnWJCUTqzFQA3oTA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=XobE76Q3jBoA:10 a=yPCof4ZbAAAA:8 a=20KFwNOVAAAA:8 a=7-415B0cAAAA:8 a=cownQ8NzdbjmzJuQbfAA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 15, 2019 at 05:43:43PM +0200, Christoph Hellwig wrote: > And inline mapping should never mark the page dirty and thus never end up > in writepages. Add a check for that condition and warn if it happens. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Darrick J. Wong > Signed-off-by: Darrick J. Wong > --- > fs/iomap/buffered-io.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 00af08006cd3..76e72576f307 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -1421,6 +1421,8 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, > error = wpc->ops->map_blocks(wpc, inode, file_offset); > if (error) > break; > + if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE)) > + continue; > if (wpc->iomap.type == IOMAP_HOLE) > continue; > iomap_add_to_ioend(inode, file_offset, page, iop, wpc, wbc, looks fine. Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com