Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp602471lqs; Thu, 13 Jun 2024 22:59:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXlN+oDJpmPX5UQiVdU1EifTmJiFgjKEetwXtgP2NVnA5lK9qKjXRZQD71zMCwXoCTpvKmkMRYX80GecwrUrTpV3+vlqWnHYt/Dg01Ng== X-Google-Smtp-Source: AGHT+IHMMrDQRmRTfiNfLucQJuWNJKs7wM1vcExQJrlLFiNaZ2yK6fgYO/A3wXjSaJyciijcAnw/ X-Received: by 2002:ad4:4b2d:0:b0:6b0:6ea2:619a with SMTP id 6a1803df08f44-6b2afc758e8mr16582116d6.4.1718344741870; Thu, 13 Jun 2024 22:59:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718344741; cv=pass; d=google.com; s=arc-20160816; b=BWl7m6CyPyhrx1oy4CkNkg+wnvnug43vTlz1viGXC9XIfkv02SqHbX6DY+jYuF2xyi hpmGZ7CTmW3W6QLJz62OTxWTpioCOsgGiO058qZodWeFMstPRtEaE6HdgmYd6dMoSRJg 80m2aux3GStB6ATpWNwPqE0soP7XmDRlnb2NwsATIA1cCku8IDGtUrP/2GB9frCtQHFP 4oZzJjjsW2UYWjKCaaX0bSN6fI3BBC/VRDa2yvHmqrDj6MlcCn8UIaveBsxjZIURw9sj d7jn28b0qrAc2+d0rZi1GOiouxkHga4La3fPCwgJkyutKDSDneonOZLGlCmLlS0kUeDv WwQA== 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=aiR8KluRZrK8024tgwaCQgiiuc7LvgtUkwwSFHGJK8s=; fh=Fd4PFnA3krwNIPOvLxQhGscKlAzzE71m6dr/VE1uxA8=; b=0o9ljUOp5dCUCWylr3VWlTBlwH9aqL03AkGGN1Rg6kakhWSkNzFga30olVKOns6npc Cbpgazcj2tNnM9TTl6EQttfbnudpuiEvltY9yzVswP5dpMTJ/Ijl6st/jSN/J8N9aTb/ dRWGxvJ5t/faVwkC9hDrfxYwJReu29vietoEQJvRRj/KcAT862dr0TZk8CvDnvSZvzmV w+9Np0txuBhRtorAD6+LHlxSdDWbayhbhCGEVTczp7pCvyse4cNSBn7A4CtD8fFvKnw/ rGcWas483aEckMBkUO+UchGJTBxesf7B67OJLbeKh2QzREGiXYoEHZH1UZXugFbh54UJ jPmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=RIUGGDmQ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-214382-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214382-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 6a1803df08f44-6b2a5b29083si31841286d6.335.2024.06.13.22.59.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 22:59:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214382-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=RIUGGDmQ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-214382-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214382-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 1C0281C22495 for ; Fri, 14 Jun 2024 05:59:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B392B1482F2; Fri, 14 Jun 2024 05:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="RIUGGDmQ" 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 30A61146A90; Fri, 14 Jun 2024 05:58:48 +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=1718344729; cv=none; b=PS1eobavu1WatS85PInf6oCJRsykd3UQ+oUA99JI9pEwQVBIZ6otxNIp0qpkoEXbI8+ozfXYVKAbkskF0dqbnflXvDtBVEl3aFuqG8orFstRC2cmQDCpbp+7v5ysETePImE/U+E0NVX9wNQeeY+qwfEXOzfcnpi0enuWOTsLvZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718344729; c=relaxed/simple; bh=2W7Trm/7VY+Bt5vh8GDrzCZNVN4WDeSncx0AdiLm5KY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rDpQULUmA7GVHT/+vy3VL3HguSMmpyvIYVDOxIn0TC6vWP1KbLu+a8pw65DftP+TYIn62zS/K4wxio7mgsDXfnS9FTjtA0Ujbl/EFFUC1WgcWr8JNyDJGZBBz5hIojAlE3Elm4zrkgN5jPp1zkhex+hKUa1WtvZDDSToiQTDfjw= 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=RIUGGDmQ; 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=aiR8KluRZrK8024tgwaCQgiiuc7LvgtUkwwSFHGJK8s=; b=RIUGGDmQg/sLW9wyDnsOvTh5xq pmChq19poY5mKNii2/16cWp+o8vvtns5DwHrQ+SmRATp7EZgBbM7OylvAj48VHBt26l+xSzzlOUzE sPUA6VMl0Tf6yYqES0jRnd+5OmnVca8TQaqK2uGrTYIEeARWkgZHsukA2PW4DSeA9hL3RUtGpCLMM OhwG6hhIUWKQZEK5prXTgX10W8JPfwEc86aVifS6q9BDyxcNX9h+p7i2320+LHdjV6NHMAHcr+3iA oXEOP78HrOmasOI8KhHuvH2FIjyDHoHrvB9lGhbdJKvI5ZE8JICuewVXwCroOgC1NPfVg+b4RZJlw EBo4hFOw==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHzxX-00000001Z8J-31HC; Fri, 14 Jun 2024 05:58:47 +0000 Date: Thu, 13 Jun 2024 22:58:47 -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, jack@suse.cz, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH -next v5 6/8] xfs: reserve blocks for truncating large realtime inode Message-ID: References: <20240613090033.2246907-1-yi.zhang@huaweicloud.com> <20240613090033.2246907-7-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: <20240613090033.2246907-7-yi.zhang@huaweicloud.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Thu, Jun 13, 2024 at 05:00:31PM +0800, Zhang Yi wrote: > From: Zhang Yi > > For a large realtime inode, __xfs_bunmapi() could split the tail written > extent and convert the later one that beyond EOF block to unwritten, but > it couldn't work as expected on truncate down now since the reserved > block is zero in xfs_setattr_size(), fix this by reserving > XFS_DIOSTRAT_SPACE_RES blocks for large realtime inode. Looks good: Reviewed-by: Christoph Hellwig