From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 479213F8234 for ; Mon, 6 Jul 2026 07:25:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783322715; cv=none; b=IsiXeP20OXWBgs/npNZTZuUkeM+A4dihDTPumaPvz7flHndNRwUtSBfiCInnsd01bLyn38M8ZTqe2arZjYVG8bk4OdECrOiRWjfkEaE69TtlDVUQ6rEO9vfQbBKhcOZPtKAikdZSCC5VMDSUGwlYTy2MugOFPk2ysciJRcl+uYE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783322715; c=relaxed/simple; bh=9N3D1JdA6UgBEtBexlu4fyeGlxQejR0JbfCW6VcEuMo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=alEmuMcMaqSxs9V4P10qGypitMfDOoi+lvwp4uyfQPkOgJGGfgcNm32ZZ1GXrYDr2hczbNLKypYrfe6zKd6VYNny9aHPcUuGmwU6Yk9cuRgonRtAe/0wFawbIdZ0Rx5c29LwTm9HsUCTIreTFSjQpQbkjr5+7R71hAJSeU6Gjw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=FJmAwMTr; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="FJmAwMTr" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-493c7902f47so15054525e9.1 for ; Mon, 06 Jul 2026 00:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1783322707; x=1783927507; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kE6M5yyybFDeD5AwWJUv3PfTIyMtdXSGYBvf4zcPAws=; b=FJmAwMTrYnMEEYlnOZyyxuLlAWijsiw+0C0Ek1vaqFODwjRatmwWVhlTBkbIEIWCxg TzHnR6HugBPKPVA3G/dgv2TBgiz6/gmvLx67RAxulZsO1NiiKdW47GeBFU0BbYpbDr7C TJu+5YPyBpYQoCkMQ4HYgCNGdpXnoVKfvydAManadhPPclRd7Gav3x7eRnzRrdJYl0OH PydLNBH02jaQh/7inubaxkLbWoEr7TobztDxndg1xSpU00oHQwg1u2l6EU3BgRHzZNqb eqet9Y8knYrUATltHdNOzEjueubib4ONGSV1xG3QjaOv4ufl4NmU3kmoad80Rul/oLEU A9xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783322707; x=1783927507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kE6M5yyybFDeD5AwWJUv3PfTIyMtdXSGYBvf4zcPAws=; b=aCDiTyJB8Qk7vNwMZtvDRGXvu7SvW/7kPT5jnQvAffXAp05jFwg2scu7hKZGM9f9tB nxsrJHI28hGdwR/CQeahd+V5nTtyfTjs0EQ+D57uwQIlm3pvVowMjzebrDJNWyu9OXtX QK8JbMywGsSPLFgsRXpPRILQxKDBMZUguEyQtgsnRSHs16nPW+in+mT/QlATYnj/z9Ih pEhvmxs1ico0SlXCTBFSp8qr/+GhR5CBeuf6ttPSgPzLDl6DXTHnNSonnCzvvNPhquZS hgNMPgFQObxSDN+6NRbzw92Kdwetd4i3skJ9HRRw1FcIhLTTNESPyM4C5t2I5qWoCrwR COvQ== X-Forwarded-Encrypted: i=1; AHgh+RojcQI96K9kaWfu2twbIDD5SSnXODf3dma+4cBxoF/5HBLlN/XBM0kBN79bgt+QQm3Vhbr9EbCXgPnHlAU=@vger.kernel.org X-Gm-Message-State: AOJu0YwJiCNB7saxhaqYv0xu+7QVDlfYCPvuJJ/+x7sX1JW/Q5bwRoFp j/YEwHisfmlJcTUygRedFnD0nEKUixAiQCy51Yx90SS0EV9mc4CWHjJhYeCBB1A6dDY= X-Gm-Gg: AfdE7cn30RrflH64iE2HbP47rvVeziDWZMdje3M4fqZ3lHWHpYO5yIL0DhUb+9T4DC+ 8rqxax4uaMQASzJ9aw1P46iJQif1M1lZKXuDU9PJcm6W1hRqjvff/fofruPt5/v/zuxJgX6cU1Y uxF8mQ6YjRw8Sm7siUGKzjUOh2cz+dd6ZA4avn5shHXSbTA4nfvI+LMB7Z/FLVT+1s9IlDIsJqh OQ1fvBxIuuLUyAhewMhR120RE7OgQe6i7mg1XNi6Ik59dnAJ5nAvWwTAhCeo/rKfTN1Lp1OLHTH yZK4diT14RX56CEqpJWA9yu1p+RXZK/9JHC3nHDpuuDGKZgZDfBk+uuyKTZVB3TMUfKIsxlfdud ZGP47TQHgRN0x1QQVQu6515K439W4BkhiNvvf9G1k+Il/6J+IWLWpzs5YTd7TAj3GpGUPdF4FEe FbmCbMDYHln/65RrJGaVt4/bhraHEzZ5K/iliL6ZCOJBaW1SYdOfv8ktj8rtYiSIpuGuswrYOjm 6IVJcgnLhPbBI6/ X-Received: by 2002:a05:600c:6286:b0:493:d2b1:48c8 with SMTP id 5b1f17b1804b1-493d2b14ebemr96316045e9.33.1783322706829; Mon, 06 Jul 2026 00:25:06 -0700 (PDT) Received: from raven.intern.cm-ag (p200300dc6f45eb00023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f45:eb00:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47a9de1d905sm22324916f8f.2.2026.07.06.00.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 00:25:05 -0700 (PDT) From: Max Kellermann To: idryomov@gmail.com, amarkuze@redhat.com, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v2 15/18] fs/ceph/super: move `ceph_cap.caps_item` into the union Date: Mon, 6 Jul 2026 09:24:46 +0200 Message-ID: <20260706072450.3920010-16-max.kellermann@ionos.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260706072450.3920010-1-max.kellermann@ionos.com> References: <20260706072450.3920010-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The `caps_item` field is only used if the `ceph_cap` object is "reserved", i.e. when it is in the `ceph_mds_client.caps_list` list (but is otherwise uninitialized). This reduces the size of the struct by 16 bytes. Signed-off-by: Max Kellermann --- fs/ceph/super.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/ceph/super.h b/fs/ceph/super.h index abe403eff0bb..afe681a47f71 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -208,6 +208,14 @@ struct ceph_cap { struct list_head session_caps; /* per-session caplist */ u64 cap_id; /* unique cap id (mds provided) */ union { + /* reserved caps */ + struct { + /** + * For the `ceph_mds_client.caps_list` list. + * Protected by `caps_list_lock`. + */ + struct list_head caps_item; + }; /* in-use caps */ struct { int issued; /* latest, from the mds */ @@ -224,7 +232,6 @@ struct ceph_cap { }; u32 seq, issue_seq, mseq; u32 cap_gen; /* active/stale cycle */ - struct list_head caps_item; }; #define CHECK_CAPS_AUTHONLY 1 /* only check auth cap */ -- 2.47.3