Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1068011lqd; Thu, 25 Apr 2024 05:22:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUL8NSxGNAW1qw5e5C8z/lar9ZBk/NxSieNxVG0UbsuX66uXUWtQeVJnPTDa94JE5326xk4Xfk2Ccaa89O85WINQ2WVghzmL5q6hfxmvQ== X-Google-Smtp-Source: AGHT+IELmheja6z3js5RL9UCh0JAwwWJS/f1BlB8571IPDz7+/Kkjlm9CURBNW9GTobK3LRt4uoq X-Received: by 2002:a05:690c:3505:b0:61b:9369:ef28 with SMTP id fq5-20020a05690c350500b0061b9369ef28mr3696746ywb.9.1714047768635; Thu, 25 Apr 2024 05:22:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714047768; cv=pass; d=google.com; s=arc-20160816; b=rH9obQAc66zALb8YZaRFd8/0TroaCqpX6K7h0pXbvgCnzsuehP2A5Jw1+Ex5VRyHi1 Rpl8RJ8KngpfAAAUpQoqFBKZlJDq/4Ox6oidu0gVl9H1anGUujLzpEoZ7MdIdiuYBcnD c/TqGSc0178kkMlvrgVSAlrVozLk6SXCHPqV4eaZxTOeDNKOEczHCUzrH5GNRBe16i7V wP5x8pvRXTvLrek891HusocT2+uuJEKFRjOR5PFCDbDxELh5EBIUe0OlUJ/MxsTR2goW ikWnESvqgDu62WrdmNqBAh2Eg2/gOZ+bCd7fSTtE2g543pb71gMZziI6+O0tVNX0CIXB 2+mQ== 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=5kmdkkgmxltKWTQk4TRnBXqD+WYMw+Ii9wmT2IhgF+M=; fh=mYTyDLxgh2mA36AOgCTtNR3TbotOg4hSU3jQ0m6UCX8=; b=rqMiS1jCgWDydWSoBVYWHpTCyKbNZBNDuu9vFVGh2n4Oo3n+zgTJeXTIwANLkuAaHU LFtIXbutqG9LqpX2D1gItYzMxaJB/D1GHmxq9J/Ud58WWFg160AEVP15Jn2CPwvr8gu2 i3bs+L5EycjxJwrsB25H34clOh0jNPHT5L14wGkBcfS7QkFyWmsWG4r3xR4p9Ip4wMDm dhmptBIYbiqCVMZxOO+OAuYaFyTUV+aEWvE7H8NHtU1AgEnk+iIS10JexCRT3PVYA985 829MLx3LT85ra3QPFBhPquaREHV6g5r/6BRx83RzcRMkBTk8Z1DNXyZP/1GBTvpTOVuM Czzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=4TbXn6nB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-158513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158513-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 bp7-20020a05622a1b8700b00434ebb4a080si17526441qtb.681.2024.04.25.05.22.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 05:22:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158513-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=4TbXn6nB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-158513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158513-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 5BA3F1C216B7 for ; Thu, 25 Apr 2024 12:22:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C43812C466; Thu, 25 Apr 2024 12:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="4TbXn6nB" 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 44BFA12AAC5; Thu, 25 Apr 2024 12:22:36 +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=1714047757; cv=none; b=fOKL2HLt/30kLbUZ5oAsqu2O8GT0OnV3bF+1UsqVtwyUzf5NXkBbYMUves9SxkFpj6ICJW0rjbdhkXVYtZud2icLc4CXxNomAkxHbnSljOi5QoDf9Vq5RjNwdDkpJHXTgVfeT4UCqPS8smfxen5omz3Z/kpH0Ou4sKtNMLCyA8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714047757; c=relaxed/simple; bh=ac90Xptu+LlZdA2H1bGYh9aUekchXQrWaju28h5LvBk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MSuDLOgUpcTysxOxNN5ViLTe8nsCEFtRcHv0m1yW0zUlOl2Sq24c4N0AC0vdbeuyir2iZXhyGX3Z3EcpUkon5RYOscM17mjZX8FcZ+/C9q0dQP7VQ0oS0QIvwwk4kTjxDjyGtbRwEGawNP5szfyMhnAKpOw/b9oMCzFDZKH88Xw= 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=4TbXn6nB; 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=5kmdkkgmxltKWTQk4TRnBXqD+WYMw+Ii9wmT2IhgF+M=; b=4TbXn6nBSXtbGSFyjPidJ1dkTq kz/vOUst+cMP+R+woJCvf0tZuMWXcuOX0colAum5jIVBfBm/SXHNXBeeceqHvotdSH/HILVeE6koe cX9y+AEKR1R2rJaUaQ3oHb1hnnteqOY0OehYypL2iAbMc+DXeL7fQMDSYtD8WInPgX3Dw7QNR7sD7 odBbDcjEWk5tVXeTaaj/0WXRP5Th7DYNboCY4dgxJ093XmvKw/c12GYHXui/ikYmMTr65HG28mqvr VsPCzIHWpTW2W1cKeCAlGmQONjP4Jp0T1sDxHWDRAzdxKdjxxUWQwdkGZ48Wfkv8iZZKxHHNiCap7 iFlZDxNg==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzy7W-00000008CMg-2JzU; Thu, 25 Apr 2024 12:22:34 +0000 Date: Thu, 25 Apr 2024 05:22:34 -0700 From: Christoph Hellwig To: Zhang Yi Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, djwong@kernel.org, hch@infradead.org, brauner@kernel.org, david@fromorbit.com, chandanbabu@kernel.org, tytso@mit.edu, jack@suse.cz, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH v5 4/9] xfs: convert delayed extents to unwritten when zeroing post eof blocks Message-ID: References: <20240320110548.2200662-5-yi.zhang@huaweicloud.com> <20240423111735.1298851-1-yi.zhang@huaweicloud.com> 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: <20240423111735.1298851-1-yi.zhang@huaweicloud.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Tue, Apr 23, 2024 at 07:17:35PM +0800, Zhang Yi wrote: > + if ((flags & IOMAP_ZERO) && imap.br_startoff <= offset_fsb && > + isnullstartblock(imap.br_startblock)) { > + xfs_fileoff_t eof_fsb = XFS_B_TO_FSB(mp, XFS_ISIZE(ip)); > + > + if (offset_fsb >= eof_fsb) > + goto convert_delay; > + if (end_fsb > eof_fsb) { > + end_fsb = eof_fsb; > + xfs_trim_extent(&imap, offset_fsb, end_fsb - offset_fsb); Nit: overly long line here. I've also tried to to a more comprehensive review, but this depends on the rest of the series, which isn't in my linux-xfs folder for April. I've your're not doing and instant revision it's usually much easier to just review the whole series.