Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp302266lqr; Wed, 5 Jun 2024 06:40:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBN++I2Vj0/kbA21O+DQI7EXIxhVW81V6Ko0vOq1PQ6tqbtbfaW3OxokyEMBnQe/0zZN8ZjWKcHGrBeZ/rNFUV6VvQ6h18OjVwQWoxwg== X-Google-Smtp-Source: AGHT+IG/1Zvz7PyjBr+by69LZYVyTjKR9glSKPF/oeVyjukxoAGq+TtwPpqLEgMe92ROZhFH4MFh X-Received: by 2002:a05:620a:45aa:b0:792:8c59:f56d with SMTP id af79cd13be357-795230715c2mr527807285a.30.1717594814901; Wed, 05 Jun 2024 06:40:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717594814; cv=pass; d=google.com; s=arc-20160816; b=uxYicV3wycmtccxYtZ2Efac/U3YTYncbNyM8KmHhaw0HdWZ62sHTCEDtk7OIpZhfkb JP8B+yEn0UKyhq7j8f+ULViSQ6OlokJQr3sWLAQhncnqesyPLSmAPF5+IT+MxDgtd57b f4oDnOG8X/GoZfyFgAGvRttBKvO3lJDDpU8gOZYmkgqztYBuvZAGTCifnlIRGmw1aXSA y+e+9N5YAtHFT1U/HTiIjy+u368Q6BDii4/ysmzi3hZFYr/3aWAMy84ZM8RrgJeAhTvc EA5j47VQwcnvICd3hWtEiRRZjm1z6tFC4+CIF5xmZwsqNdUq9bA37F3iA0DaDlfQau/7 h4vA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from; bh=FpJSm0J1jEQQpUDbW+K2aiD8E8N7vnXDBGJYZC8h09g=; fh=OicDp/9Ga19gM0GT5YjwEcYTu05Fv51gAIAUkiwRGMM=; b=p1ixabV1ou5oCt95rzWNPkDBF/CG0Vi0MlRzuWm+M2fR6/aWmYXpG73HWwrNt5crUf 8nxnfGundL1r2UIpuaGmbHHeJqQjLHpEoCzh+TkIqS7HphOhy73tqBtm/rQjjCs77of+ srEdIqe5InFmNcyMTJhdkZ+ja1d2ISOBS1l3TeRk1/wfUgYRYn6+kFqe5vyoP5QvXMq5 A5QaFlZt2xd32oIHA/AS9iqqOzw+7ABe/5GXP+WtDqoA5yVov53VYZvz8SDHKOlgGoqw CHI2/0DCcTjX7pk68T6LrDpZmqvgpV9XCWAzwxzX+tQ/lJq2bs8qPfn06vXxcy7+2XOB QTsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-202689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 af79cd13be357-794fa906273si38924385a.325.2024.06.05.06.40.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:40:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202689-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; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-202689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 92C011C22B75 for ; Wed, 5 Jun 2024 13:40:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75632199241; Wed, 5 Jun 2024 13:17:58 +0000 (UTC) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C8B4196445; Wed, 5 Jun 2024 13:17:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717593478; cv=none; b=bUhqSs98hr1M0qqClB/VG1+pXxeANDJ80afeG0YA2qbA9n7fmrUk/QVvzBGhxP6R8A30oLWjlRtFP4E6kibU4OVf+LQYp2pgxOIn0eqyAGci3IoVnrJkNXZQBXLJLHd3pj/kkDUQWLqUK1nD4camJ466NNgwFOP6VY3cf6rWc/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717593478; c=relaxed/simple; bh=wER0C23IRM3B+E0P+tpoGLwjN+qlq9Cy5JPJ+jUloxM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FcCZRIc5M6xfG4oypASA2t2aaeN2Rh9vUS68QG+MSd01Yd7Xk+wrLp0mZJh2kAtYrlz88oYvs+Lnu/CHFBZ0W2M+UkHBcsdCJ7A/QCy7SulIUa2W9J1Kb58setvsp+6izVMpq8bhiVl+HPpv7Qnyg0Q9ZVKbMP39QZ44vABmcsQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-57a1fe63947so6533257a12.1; Wed, 05 Jun 2024 06:17:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717593475; x=1718198275; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FpJSm0J1jEQQpUDbW+K2aiD8E8N7vnXDBGJYZC8h09g=; b=UdAA/dAFrI+YzRfm6Xjj9Cak8EuZfQ2BrKgBIDNfcZiKYdktt+lZs7iRJI+NhfkgRQ NZBa/YS64QOVz21gRbm+F1GHs/JdLnpAKUXMNCsZg6oolv66oqK/43dBqSZM/Yo5CVzF zXA5idaq8THnzt7Y+Kx+iK119bX9DCn+dB4wqyAWz3Qtv9h9KXIfY0lJodObpxmRAtRN yAX7/rcj34MwQ+G3tV3fPdl4rRuVeuGOYgUrzyHdSeCr86oH6NcOWk6+jZiS2lgNDzRK yxrt5C+xvCu3knGCi514ycrM50BSjMknEpVEJlnnvjQdUS5oTuiPE0E6wzfxE97I1DDh CYUA== X-Forwarded-Encrypted: i=1; AJvYcCXeN6QsEVokIxbgq5azOqpdrXGe97QGF865o2nQLkg1V1wmp8+rVw1XlaUX6Bu/0ngxa5Ii57F3KKHi05OktMXQM7GaoLRc9u7f0vxm X-Gm-Message-State: AOJu0YwRQzppsDrSmLp0NCkTQaqMWnU9FDqPnQC51T+FM8o8jDHbtU9E 9FH1k5IcxmvFWnurPZEhPpipHXOLgUYHqVzwvJK8ckpEU8TWFr5npvM6NA== X-Received: by 2002:a50:d497:0:b0:578:6198:d6ff with SMTP id 4fb4d7f45d1cf-57a8bca263cmr1707847a12.33.1717593474403; Wed, 05 Jun 2024 06:17:54 -0700 (PDT) Received: from [127.0.0.1] (p200300f6f7253800fa633ffffe02074c.dip0.t-ipconnect.de. [2003:f6:f725:3800:fa63:3fff:fe02:74c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31b99a3fsm9266913a12.9.2024.06.05.06.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:17:54 -0700 (PDT) From: Johannes Thumshirn Date: Wed, 05 Jun 2024 15:17:49 +0200 Subject: [PATCH 1/4] btrfs: pass reloc_control to relocate_data_extent 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240605-reloc-cleanups-v1-1-9e4a4c47e067@kernel.org> References: <20240605-reloc-cleanups-v1-0-9e4a4c47e067@kernel.org> In-Reply-To: <20240605-reloc-cleanups-v1-0-9e4a4c47e067@kernel.org> To: Chris Mason , Josef Bacik , David Sterba Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Johannes Thumshirn X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1410; i=jth@kernel.org; h=from:subject:message-id; bh=YSsr1EzQHpx+x5w2OEIUfA+J6YfsAt/3JAEdrkSu0zg=; b=owGbwMvMwCV2ad4npfVdsu8YT6slMaQlpNbbTX+if43R9qXCzn3eoSZ7iiKlynyvPDw11WH2W zn/DZemdpSyMIhxMciKKbIcD7XdL2F6hH3KoddmMHNYmUCGMHBxCsBEJkox/K/Ju1Wx6tzvCwW5 c07IlwZu+aCScchXqnhl/rsj1XeZd55j+O/4aeveIqFkz1OntbVcp52xzosOmnl3eW3YzTTDWW5 G51gB X-Developer-Key: i=jth@kernel.org; a=openpgp; fpr=EC389CABC2C4F25D8600D0D00393969D2D760850 From: Johannes Thumshirn Pass a 'struct reloc_control' to relocate_data_extent() instead of it's data_inode and file_extent_cluster separately. Signed-off-by: Johannes Thumshirn --- fs/btrfs/relocation.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 81836a38325a..442d3c074477 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3123,10 +3123,11 @@ static int relocate_file_extent_cluster(struct inode *inode, return ret; } -static noinline_for_stack int relocate_data_extent(struct inode *inode, - const struct btrfs_key *extent_key, - struct file_extent_cluster *cluster) +static noinline_for_stack int relocate_data_extent(struct reloc_control *rc, + const struct btrfs_key *extent_key) { + struct inode *inode = rc->data_inode; + struct file_extent_cluster *cluster = &rc->cluster; int ret; struct btrfs_root *root = BTRFS_I(inode)->root; @@ -3745,8 +3746,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) if (rc->stage == MOVE_DATA_EXTENTS && (flags & BTRFS_EXTENT_FLAG_DATA)) { rc->found_file_extent = true; - ret = relocate_data_extent(rc->data_inode, - &key, &rc->cluster); + ret = relocate_data_extent(rc, &key); if (ret < 0) { err = ret; break; -- 2.43.0