[PATCH v2 17/18] fs/ceph/super: reorder struct ceph_snap_realm fields

From: Max Kellermann

Date: Mon Jul 06 2026 - 04:15:53 EST


This eliminates two padding hole and reduces the size of the struct by
16 bytes.

Signed-off-by: Max Kellermann <max.kellermann@xxxxxxxxx>
---
fs/ceph/super.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index afe681a47f71..ca4db56ef2d0 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -1020,16 +1020,16 @@ struct ceph_readdir_cache_control {
struct ceph_snap_realm {
u64 ino;
struct inode *inode;
- atomic_t nref;
struct rb_node node;

u64 created, seq;
u64 parent_ino;
u64 parent_since; /* snapid when our current parent became so */

- u64 *prior_parent_snaps; /* snaps inherited from any parents we */
- u32 num_prior_parent_snaps; /* had prior to parent_since */
+ u64 *prior_parent_snaps; /* snaps inherited from any parents we had prior to parent_since */
u64 *snaps; /* snaps specific to this realm */
+
+ u32 num_prior_parent_snaps;
u32 num_snaps;

struct ceph_snap_realm *parent;
@@ -1047,6 +1047,8 @@ struct ceph_snap_realm {

struct list_head inodes_with_caps;
spinlock_t inodes_with_caps_lock;
+
+ atomic_t nref;
};

static inline int default_congestion_kb(void)
--
2.47.3