Re: [PATCH] ceph: streamline request head structures in MDS client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 10, 2025 at 8:25 PM Viacheslav Dubeyko
<Slava.Dubeyko@xxxxxxx> wrote:
>
> On Fri, 2025-01-10 at 18:05 +0800, Liang Jie wrote:
> > From: Liang Jie <liangjie@xxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxx>
> > ---
> >  fs/ceph/mds_client.c         | 16 ++++++++--------
> >  include/linux/ceph/ceph_fs.h | 14 --------------
> >  2 files changed, 8 insertions(+), 22 deletions(-)
> >
>
> Looks good to me. Nice cleanup.
>
> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@xxxxxxx>

Applied.

Thanks,

                Ilya





[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux