Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp149163rbe; Wed, 28 Feb 2024 15:30:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFwHkTf7Wthw5jqNNN+H9JjQ3hj6KsGo9T4otuvM1eDAix6g331FLuFMpkZLIm1HqbCLMZKntCZ0wdeeQ+NLCJW6UDWA0rrBzQ2G8qLw== X-Google-Smtp-Source: AGHT+IF+1f4UdGyKaPvbcnAAdtRLaHashCaaUze9XK/vpuXEOoA6LoN52WlsUhWmdcQgzzmUAmmK X-Received: by 2002:a05:6102:6d1:b0:472:7906:dabe with SMTP id m17-20020a05610206d100b004727906dabemr394790vsg.8.1709163035155; Wed, 28 Feb 2024 15:30:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709163035; cv=pass; d=google.com; s=arc-20160816; b=lrMplF0QwZhQiEFIuoZf4vTznDoXh0c/PJWGpzgv4gxvM6qWuDWKTXblL8N5+bvAuF LFtVHybZWluTdZRVcvA3qq5hLnkev9QjpclxicRkxnt7mCX8t8QZ4k4kOA5+9cYXZACi qr9gTAZxyyluXmBQPiwip2saqkBQRi+LO4b3R4iEw5N4odf/qUJqQXxCRbhd3CLH0BoL VPZYrkZsvQlBzbqeR88cRZkbWc3vvpjZZiCHeNVcysbpLRaUgqwo7p55p/Bge4OvXx6K A5pOoQ1GwrPYeOD/Me7O3bpz13ZHJM3sA5ffZuzcKj2wzPkxogSDx0X2rnr6uGVegxgP seTA== 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=LLkbzykmttVYzbp2D3VuqEYjbZw4cd1Nkxs+BldTop8=; fh=LXyGjMdeNSac3RE97kz3b7HdOAnW5qkVtY50tNfLGnA=; b=tBle5vgHJ/PrDSLgU0qRhFT0laVfy5P+aOP50xQ8je9A2DTysa5Wnk76swvD2uubaC Pe7qkYx0iEbunExAg5YHUUCXUtR5DsuVFobXYGYEja7ILctIkHeVqSm/eEStdYgoKIv4 EYtu1sArNdDfR9ls89+az4eFw4IxeRTAdH5FpbKYR86qDnMEAEeThh+VEURcZyW7sJJh bB/X35DkC/uclhnxnvpCMh92znEZGo2oPAoSLfXPGBS+gHoSBWxTmx4mmvP3OyY7018u K9uiRJa/vwxh6mEcamGFC2jxC3dXVqrM0BWnARTXl2unh1W1yJ1FaSqXvzoCPsRB+DxG l+oQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="GI/raViF"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-1418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1418-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id il3-20020a056130600300b007d8e9868f73si19991uab.13.2024.02.28.15.30.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 15:30:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="GI/raViF"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-1418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1418-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 DF19B1C233E9 for ; Wed, 28 Feb 2024 22:13:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62C631361C9; Wed, 28 Feb 2024 22:13:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="GI/raViF" X-Original-To: linux-ext4@vger.kernel.org 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 B40141361A2; Wed, 28 Feb 2024 22:13: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=1709158405; cv=none; b=FMNbXMdkdVTxkaThLBAbkp1HVTnKwR5zFr2ufIMBkR1xuiJw4tzoQKQvbIyKya3bZp0JJHjUDWYTVfLgBAsaJrRfkbxbQgA5ibcnxU8V6Wg1ih075piKfffqSal14/nMFnaAS6anIQpvg4nuWofg7ehW5kTv+HJbouLNNT/jZDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709158405; c=relaxed/simple; bh=qevbNgNmR4geqRNA0PPjIf+hsr9mNI+FGtNQRvPTu6Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oF43HtLNGCbWuypcKWXg3Pv7G4ufakdVyaSFyiy9Kxh8eIQYGqaAqmCK4+o39+Md00n7hXeBcsIabfBBUmktDHOJxhRHuJXv54Ddiy4TK54mnFPJ3TkeNXagAep03z3ZrFHxb8sumFbeixl9iowdTm2tvoOuASDbh7FExwoeIaI= 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=GI/raViF; 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=LLkbzykmttVYzbp2D3VuqEYjbZw4cd1Nkxs+BldTop8=; b=GI/raViFDOZ9NZv3JyZyrTn6Cy ev1a9QtJ4WRg/ZTm2LMH/yw8pdW8rxyv+NB+wAz5WukIRkjjKPON+YyiDLngrKpOEX0KNVavlv3Qe uDW0GBTxbCB9Z3nDz+qwPhoXQtwnCTbkwhcm+C29pMuW42wklpOvQADJXj3G9Q13jgmZKw9W8GkMd 5vueTw9Jhvo9cQ94i1kq4Uss7N2tv76sbrGLHQOYM7hrAZlCEqa/UXRU0UGEHdAlSNhnb5ikVPRXb gHSeMz5MI7aRO+j83dXn7Lv4k+htMkHVPZ+5hLp9EDrjQgk/itsU5Kc3uS4Nkqjvtb9HNlsdKNuAT I9XXPgbA==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfSAx-0000000B6TL-0oZz; Wed, 28 Feb 2024 22:13:19 +0000 Date: Wed, 28 Feb 2024 14:13:19 -0800 From: Christoph Hellwig To: Zhang Yi Cc: Christoph Hellwig , djwong@kernel.org, Dave Chinner , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, ritesh.list@gmail.com, willy@infradead.org, zokeefe@google.com, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com, wangkefeng.wang@huawei.com Subject: Re: [RFC PATCH v3 07/26] iomap: don't increase i_size if it's not a write operation Message-ID: References: <20240127015825.1608160-1-yi.zhang@huaweicloud.com> <20240127015825.1608160-8-yi.zhang@huaweicloud.com> <9b0040ef-3d9d-6246-4bdd-82b9a8f55fa2@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@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: <9b0040ef-3d9d-6246-4bdd-82b9a8f55fa2@huaweicloud.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, Feb 28, 2024 at 04:53:32PM +0800, Zhang Yi wrote: > So, we have to handle above case for xfs. I suppose we could keep > increasing i_size if the zeroed folio is entirely outside of i_size, > make sure we could write back and allocate blocks for the > zeroed & delayed extent, something like below, any suggestions ? Sorry for being dumb, but what was the problem solved by not updating the size for ext4 again? (for unshare I can't see any reason to ever update the inode size)