Subject: Re: [PATCH] libceph: Remove crush deadcode

From: "Dr. David Alan Gilbert" <[email-masked]>
Date: Sun, 27 Oct 2024 21:00:55 +0000

* Ilya Dryomov ([email-masked]) wrote:
> On Sat, Oct 12, 2024 at 12:47 AM <[email-masked]> wrote:
> >
> > From: "Dr. David Alan Gilbert" <[email-masked]>
> >
> > crush_bucket_alg_name(), crush_get_bucket_item_weight(), crush_hash32(),
> > and crush_hash32_5() were added by commit
> > 5ecc0a0f8128 ("ceph: CRUSH mapping algorithm")
> > in 2009 but never used.
> >
> > crush_hash_name() was added a little later by commit
> > fb690390e305 ("ceph: make CRUSH hash function a bucket property")
> > and also not used.
> >
> > Remove them.
> 
> Hi David,
> 
> The implementation of the CRUSH algorithm is shared with userspace and
> these functions are used there (except for crush_hash32_5() perhaps).
> They are all trivial code, so I'd prefer to keep them for convenience.

OK, no problem.
(Although perhaps an ifndef __KERNEL__ might save a few bytes?)

Dave

> Thanks,
>                 Ilya
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/