]> www.infradead.org Git - users/hch/misc.git/commit
ceph: streamline request head structures in MDS client
authorLiang Jie <liangjie@lixiang.com>
Fri, 10 Jan 2025 10:05:24 +0000 (18:05 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 27 Jan 2025 15:07:42 +0000 (16:07 +0100)
commit2f0805d7c08bea71c95561bfb3e45d93b05196b9
tree89bbb204d902e9993caec5c5cd306a074495adea
parent3b7d93db450e9d8ead80d75e2a303248f1528c35
ceph: streamline request head structures in MDS client

The existence of the ceph_mds_request_head_old structure in the MDS
client code is no longer required due to improvements in handling
different MDS request header versions. This patch removes the now
redundant ceph_mds_request_head_old structure and replaces its usage
with the flexible and extensible ceph_mds_request_head structure.

Changes include:
- Modification of find_legacy_request_head to directly cast the
  pointer to ceph_mds_request_head_legacy without going through the
  old structure.
- Update sizeof calculations in create_request_message to use
  offsetofend for consistency and future-proofing, rather than
  referencing the old structure.
- Use of the structured ceph_mds_request_head directly instead of the
  old one.

Additionally, this consolidation normalizes the handling of
request_head_version v1 to align with versions v2 and v3, leading to
a more consistent and maintainable codebase.

These changes simplify the codebase and reduce potential confusion
stemming from the existence of an obsolete structure.

Signed-off-by: Liang Jie <liangjie@lixiang.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c
include/linux/ceph/ceph_fs.h