[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH2r5mvqHSBdNQHm88gu0yhayY+yr6sYq1ou6ekxRVfoOrT=vg@mail.gmail.com>
Date: Wed, 28 Jun 2023 09:47:49 -0500
From: Steve French <smfrench@...il.com>
To: Dave Kleikamp <dave.kleikamp@...cle.com>
Cc: "Dr. David Alan Gilbert" <linux@...blig.org>,
Tom Talpey <tom@...pey.com>, sfrench@...ba.org,
linux-cifs@...r.kernel.org, jfs-discussion@...ts.sourceforge.net,
linkinjeon@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [Jfs-discussion] [PATCH 0/3] dedupe smb unicode files
On Wed, Jun 28, 2023 at 9:24 AM Dave Kleikamp <dave.kleikamp@...cle.com> wrote:
>
> On 6/28/23 8:46AM, Dr. David Alan Gilbert wrote:
> > * Dr. David Alan Gilbert (dave@...blig.org) wrote:
> >> * Tom Talpey (tom@...pey.com) wrote:
> >>> On 6/27/2023 9:14 PM, linux@...blig.org wrote:
> >>>> From: "Dr. David Alan Gilbert" <linux@...blig.org>
> >>>>
> >>>> The smb client and server code have (mostly) duplicated code
> >>>> for unicode manipulation, in particular upper case handling.
> >>>>
> >>>> Flatten this lot into shared code.
> >>>>
> >>>> There's some code that's slightly different between the two, and
> >>>> I've not attempted to share that - this should be strictly a no
> >>>> behaviour change set.
> >>>>
> >>>> I'd love to also boil out the same code from fs/jfs/ - but that's
> >>>> a thought for another time (and harder since there's no good test
> >>>> for it).
> >>>>
> >>>> Lightly tested with a module and a monolithic build, and just mounting
> >>>> itself.
> >>>>
> >>>> This dupe was found using PMD:
> >>>> https://pmd.github.io/pmd/pmd_userdocs_cpd.html
> >>>>
> >>>> Dave
> >>>>
> >>>> Dr. David Alan Gilbert (3):
> >>>> fs/smb: Remove unicode 'lower' tables
> >>>> fs/smb: Swing unicode common code from server->common
> >>>> fs/smb/client: Use common code in client
> >>>>
> >>>> fs/smb/client/cifs_unicode.c | 1 -
> >>>> fs/smb/client/cifs_unicode.h | 313 +-----------------
> >>>> fs/smb/client/cifs_uniupr.h | 239 -------------
> >>>> fs/smb/common/Makefile | 1 +
> >>>> .../uniupr.h => common/cifs_unicode_common.c} | 156 +--------
> >>>> fs/smb/common/cifs_unicode_common.h | 279 ++++++++++++++++
> >>>
> >>> So far so good, but please drop the "cifs_" prefix from this new file's
> >>> name, since its contents apply to later smb dialects as well.
> >>
> >> Sure.
> >
> > Actually, would you be ok with smb_unicode_common ? The reason is that
> > you end up with a module named unicode_common that sounds too generic.
>
> A bit off topic, but a question for Steve.
>
> Is there a need for separate modules under fs/smb/common/? Or could the
> makefile do something like:
>
> obj-$(CONFIG_SMBFS) += smb_common.o
>
> smb_common-y := cifs.arc4.o cifs_md4.o smb_unicode.o
Since arc4 and md4 are used more rarely used than smb_unicode (and in
some environments
use of md4 could be forbidden), and also since arc4 and md4 are not
really smb/cifs but crypto,
seems more logical to keep them separate. There are other things
like quic support
(which is important for smb3.1.1) that will probably be much larger
(even with upcalls) that
could also be distinct modules in fs/smb/common in the future.
--
Thanks,
Steve
Powered by blists - more mailing lists