From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=46.30.189.100 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796001611; b=DUhvC2P2KkEV3FjH8gfyCsi4MGnuMvw0e7nlfRsIr6y9AT+YM3//3RDmOzGkQgZRIkvN 8nRD6WN+N0DIS/dRyLFnoTzJ+b++QX0HKSBATVOv/Ro0DNbukcjKp4K0a+PHwxpjGsX2E SxIeBxNgl3dkw9Ai68tNkK6Ye+RwhZ4cYG+Fped+6fMHYKYT0riIyCc9KEbRWX82nrS1F bOXDgRZRUeMzYS9eF/9EoMhE/OVrMyqeC3M0dNe33HfEbS1nJjctZ7j+Jipl6VuwggE+J 0yjmOD6kIHpdw2MMPOWa5i345PZz04jLWPMIW6RU/JOKcXckF/mtannUEX5MfpFMqrA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796001611; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=1PaIATFHZQyVC6R3pxPqtSV8j0TUKUcpANgKC6rdCak=; b=ZhOVUCCbEtLx7dlzFqk4ZBhqPm26j8NAk/91YA8gQ2tUoWqhyAsiHdRIGkQqrJ1LFBGb Cfr9iDEHi203bTVkqqfpTqk73666QjT3j38vvP9yK06A/HPXRLJIDckvY5mMTzQfERUDm boHmV0OwLkxV69EveGpiCe0ZSXoMeVL7SHiECnmxUD9H+KaxsuqfR91L4TwDkPNLfdg3Y o472zLsXlzIy2H0zRxyxFe6rLkWrvxqkmLONWgooTPAq3W0OOMTmx5pyglKYpa0NTIpFI 7/eSlH+JdtqXLjq9c4VUCLgu5jzjLT3WH+CEj35g/XOLz7Wbz4eCnl56KsvaiChX2ag== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=iodev.co.uk; spf=pass smtp.mailfrom=iodev.co.uk; arc=none smtp.remote-ip=46.30.189.100 Received: from iodev.co.uk (iodev.co.uk [46.30.189.100]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B51B4606A31C; Mon, 30 Nov 2026 01:20:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B51B4606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=iodev.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iodev.co.uk Received: from pirotess (unknown [79.116.217.174]) by iodev.co.uk (Postfix) with ESMTPSA id 1C1D15F1081; Mon, 30 Nov 2026 02:20:05 +0100 (CET) Date: Mon, 30 Nov 2026 02:20:02 +0100 From: Ismael Luceno To: Qu Wenruo Cc: linux-btrfs@vger.kernel.org, David Sterba , Chris Mason , linux-kernel@vger.kernel.org, Qu Wenruo , Anand Jain , Filipe Manana Subject: Re: [PATCH 0/6] btrfs: trim unused space when relocating data extents Message-ID: <20261130022002.541bd6d5@pirotess> In-Reply-To: <945b0a58-b806-4f97-a685-70387235b9c8@gmx.com> References: <20261129133125.3293-1-ismael@iodev.co.uk> <945b0a58-b806-4f97-a685-70387235b9c8@gmx.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 30 Nov 2026 07:30:17 +1030 Qu Wenruo wrote: > =E5=9C=A8 2026/11/30 00:01, Ismael Luceno =E5=86=99=E9=81=93: > > A data balance copies every data extent whole, including bytes that > > no file references. Those dead bytes stay allocated, and an > > overwritten file keeps its old extents until every reference to > > them is gone. > >=20 > > This series copies only the referenced bytes. For each old extent, > > the referenced ranges are collected and laid out in one new > > allocation, and each file extent is remapped to its own range. Dead > > bytes are not copied, so they are freed with the old block group. =20 >=20 > Won't this introduce extra backref walk during relocation? > That can be very expensive for heavily shared data extents, meanwhile=20 > may even not result any space saving. The data copy seems to always dominate, I couldn't measure any meaningful difference. I'm looking into how to optimise this, though. > But sashiko is already reporting 9 high level problems and 11 medium=20 > level bugs, I think you would like to get them addressed. I'll look at it and make a new submission. Thanks!