Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2907282ybd; Thu, 27 Jun 2019 22:53:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3L6TOkIPd52qtasPG6A3J0gKBV3HxA8ywVDARHbxiHDwXZxfEm9+OhLPJm9OpPfDWvMme X-Received: by 2002:a17:90a:3247:: with SMTP id k65mr10876605pjb.49.1561701197652; Thu, 27 Jun 2019 22:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561701197; cv=none; d=google.com; s=arc-20160816; b=sgCADb6A9f/7rJJZhdPT/9zN8P2lPw17oEHdVnWBoius/WVGgKTwPBgvYuLgzf7z4W jUP6B4jNoxttCzXcvdB1MBu2IkLgC7iRze6rcVC0CNrq7jPU/AIeiiiy8PRTdRStN0dD OeBl40ykQrel1duczZqCufA4jOYkkMerRtC8+GETx6NllgGjfYOdxHW8OQb+tDZ6S90X 0kDA/6sLbhAVu/RqM1oPgePxFpfI0EDBANALIyr/YezbnvFhnT8fuCmjwjnZ5uUsu5Oc d0WBk0ZhmcQF3DFHYyyIhTGwPZ8OlVYtu1nR4QaQHbTkYylH47MljzHFcPgYn2ojsLkG P3xg== 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=wVog+NZ0f9chluKo39UoDv1n19q+syckJiv0nz98c0g=; b=QG9vBlq63KPIkeUX7/aaEtudbcmCmD1NnykSyMw7HWuQzhOz0hrAEI3ptIbel3dHTG N7L91gKx0Dtxu2FbOF3yHCEwgB/m5t70/YZ+kIjCoYtYxZ/xHtxzXHT2qh6/X638L6Cu 6BL87DkqXOG77oduoT/XOei14DXphycUKke1P7o33652PBDDIeDxuUso8FjiI2vI60Ja WGYZhq4K/QohhC8ae0ecZPpQrsWwaUOXW3guijPoNVsD4MJYAXqrLpD9HrVTlEDgRCHP QMO01C4vsuUrGYB/NFLUpehTo+8dNb6NoE4YyMioA5Tse9Hq9qYrq4xqPtXHLSHOyxW1 40Jg== 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 t2si1175440ply.133.2019.06.27.22.53.00; Thu, 27 Jun 2019 22:53:17 -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 S1727013AbfF1Fvq (ORCPT + 99 others); Fri, 28 Jun 2019 01:51:46 -0400 Received: from verein.lst.de ([213.95.11.210]:45164 "EHLO newverein.lst.de" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726572AbfF1Fvq (ORCPT ); Fri, 28 Jun 2019 01:51:46 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 41F6268CEE; Fri, 28 Jun 2019 07:51:43 +0200 (CEST) Date: Fri, 28 Jun 2019 07:51:43 +0200 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , Damien Le Moal , Andreas Gruenbacher , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/13] xfs: allow merging ioends over append boundaries Message-ID: <20190628055143.GB27187@lst.de> References: <20190627104836.25446-1-hch@lst.de> <20190627104836.25446-8-hch@lst.de> <20190627182309.GP5171@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190627182309.GP5171@magnolia> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 27, 2019 at 11:23:09AM -0700, Darrick J. Wong wrote: > On Thu, Jun 27, 2019 at 12:48:30PM +0200, Christoph Hellwig wrote: > > There is no real problem merging ioends that go beyond i_size into an > > ioend that doesn't. We just need to move the append transaction to the > > base ioend. Also use the opportunity to use a real error code instead > > of the magic 1 to cancel the transactions, and write a comment > > explaining the scheme. > > > > Signed-off-by: Christoph Hellwig > > Reading through this patch, I have a feeling it fixes the crash that > Zorro has been seeing occasionally with generic/475... So you think for some reason the disk i_size changes underneath and thus the xfs_ioend_is_append misfired vs the actual transaction allocations? I didn't even think of that, but using the different checks sure sounds dangerous. So yes, we'd either need to backport my patch, or at least replace the checks in xfs_ioend_can_merge with direct checks of io_append_trans.