Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp559689lqh; Fri, 31 May 2024 09:17:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXDls7JXmT73IgBu8kLQ8wcJAfJiAD2z21z8jloUxAsHaKvYMyzdCWGIMiqr/ij1l4DQ4g8N8ZiVwbv+iKWGs2u3NaNhJS1YQK9A9nMA== X-Google-Smtp-Source: AGHT+IG/degPurQj+vsKq2euwA0cFb+iO93xSEHhjCfm3FxR/OV2ZJisuQK3UtjM2fCq1ZKZGGJv X-Received: by 2002:ac8:5956:0:b0:43a:ffa5:3f24 with SMTP id d75a77b69052e-43ff550b0cemr26173671cf.58.1717172258605; Fri, 31 May 2024 09:17:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717172258; cv=pass; d=google.com; s=arc-20160816; b=VpkS3eNijj9jMWVV0dptq6028mJeCyC0ygVRwkzCqphTzU9lO6U3NayJR0GwLzhqcn Mw10mvcjpTMxjs1VFJ111FmN2sSj3TrBO5lCzW5sst0/NfuJnsBkjNUjSneRg4O4ICc6 OCWspcroLD5hOvA64SiwTcDZyuSvk36G2DWGiusWvQSpmIhlM2m67S75hY9A5QNUm5Y/ ACQeNTQswu7YUsEPRNGTB76aontiZwPedclN7VgVVJPMyrn4BRLcYlHJoPgPxDCmlaGU qjp9LynfZ0Kt5FplloBpsUF73iAVDytEkt31SC6GK8jzDh7AL263ncfZLl5zmyF9DxTL i+kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Mv5unSw6t2fD+qm6IWvUBTNAQOSiqb0xRVGCGHo3pdw=; fh=4BKznwiqduZPiq0RoDrPOhdZPCzoDsEhb5t2lDF81JU=; b=t0cHj7E8QpDvFFpEnVb/jdv+eO06QRP+QyngQeBDIz0LVoDc2qDh2Nwm78dkOJF9Bt hFT2ZsQ0kMRJL1N5LEcfNKYT9adlU9SzNtSM7z2l5x6Jz2VD4PTJ88152xH5oco0dft3 OsaFScOZaQBxMDRgNgxI4+dMd5gi07uQuClI/e5sQG75GIekp3QwbFNO8SFK1SMortn7 fVmEifOeQb5sKj+pqTwWrcPfhPoPb/SObhJNYfY/feGw7yY8B3BvhxFzrJh8GTs3xANw X0ClyauKo7OghPnsjgv3YByBgltoO7Ms9Rp7HCy86Cz3cfvgdO0IOCC3PJH2auq07vvc n2VQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=GopVdiNK; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-197131-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197131-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43ff23abca3si18103401cf.156.2024.05.31.09.17.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 09:17:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197131-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=GopVdiNK; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-197131-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197131-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 522431C22383 for ; Fri, 31 May 2024 16:17:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FA3115B975; Fri, 31 May 2024 16:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="GopVdiNK" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72913770E6; Fri, 31 May 2024 16:17:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717172245; cv=none; b=tl0iqpcBd1Y3o1h4e3Fd8Gj1YaOnhV+dt3vgxdswZK4MZPjirFCxPpiFcPEWrghWPdY/wrgH3XtAcHuLHGvNqfmnnpELZxifRg8VaZdDH+9g0+qMbpN/vq2khDqAt+Fx+X0l0nLYzA5D5LxUh8nqbg25ko6zdkTYsmVFrMwgeus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717172245; c=relaxed/simple; bh=YVD1oIXHVOcPzieLWrdyrn3cD5ewuei9De6O31ofDno=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UpbZxhnQvXaYGBF0j5BfupgcVqvxCYDasW3gZjf1MNCBQQEPDOtbyDeJrNxrV/A5DED2cVT7fd2nuW6xX63yYI9kh0ny54BETnO326sa7EX7ukjIlfOZ/la7+tsvZtRrnnrNVPm7gP5zjc9q5tDNL4tYXcUXUDBK3K3Kyi4K810= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=GopVdiNK; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Mv5unSw6t2fD+qm6IWvUBTNAQOSiqb0xRVGCGHo3pdw=; b=GopVdiNKficeAEV8Bu/eQwWwtn ft6au4aF5ihr38s9snX7EzpHJh5xA4kTFp4ZGq7pjw6FXKWme4CysLiiAp87jWJXcd1v+vk/+rFey wojNNK3Bbtxs9cezDDtBJsKWirRyp88gA0RnQnSxddzovPzs84kvlUay5pipfDKzp5fRCGNMjeOdx 3ShLpxaJy0ILWfH0X1A2pKUcyXxn1UGj9QZx2Nfz7zx0FPD1/+JDVEfJ+E3hDllugWWEwhywl70rs EOvDXRjDw4BNOsCHoCU7vt5l+OPQqJBQQO65vO5YvToDsPi7yYqbqIK08NZbKzb4pFfFZEJJOBRIj opaN2ReQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD4wV-0000000AoC1-1Cg3; Fri, 31 May 2024 16:17:23 +0000 Date: Fri, 31 May 2024 09:17:23 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , Zhang Yi , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, brauner@kernel.org, david@fromorbit.com, chandanbabu@kernel.org, jack@suse.cz, willy@infradead.org, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [RFC PATCH v4 5/8] xfs: refactor the truncating order Message-ID: References: <20240529095206.2568162-1-yi.zhang@huaweicloud.com> <20240529095206.2568162-6-yi.zhang@huaweicloud.com> <20240531152732.GM52987@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240531152732.GM52987@frogsfrogsfrogs> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Fri, May 31, 2024 at 08:27:32AM -0700, Darrick J. Wong wrote: > On Fri, May 31, 2024 at 06:31:36AM -0700, Christoph Hellwig wrote: > > > + write_back = newsize > ip->i_disk_size && oldsize != ip->i_disk_size; > > > > Maybe need_writeback would be a better name for the variable? Also no > > need to initialize it to false at declaration time if it is > > unconditionally set here. > > This variable captures whether or not we need to write dirty file tail > data because we're extending the ondisk EOF, right? Yes. > I don't really like long names like any good 1980s C programmer, but > maybe we should name this something like "extending_ondisk_eof"? Sure.