[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZK80mu/YbHLEABAB@gallifrey>
Date: Wed, 12 Jul 2023 23:17:46 +0000
From: "Dr. David Alan Gilbert" <dave@...blig.org>
To: sfrench@...ba.org, linkinjeon@...nel.org, tom@...pey.com,
dave.kleikamp@...cle.com, shaggy@...nel.org,
linux-cifs@...r.kernel.org
Cc: krisman@...labora.com, jfs-discussion@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/4] dedupe smb unicode files
* linux@...blig.org (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.
Gentle two week ping on this please.
Dave
(Apologies to the 3 of you who already got a copy of this ping,
recent due to a missing header ',' )
> 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.
>
> In addition, the same tables and code are shared in jfs, however
> there's very little testing available for the unicode in there,
> so just share the raw data tables.
>
> I suspect there's more UCS-2 code that can be shared, in the NLS code
> and in the UCS-2 code used by the EFI interfaces.
>
> 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
>
> Version 2
> Moved the shared code to fs/nls after v1 feedback.
> Renamed shared tables from Smb to Nls prefix
> Move UniStrcat as well
> Share the JFS tables
>
> Dr. David Alan Gilbert (4):
> fs/smb: Remove unicode 'lower' tables
> fs/smb: Swing unicode common code from smb->NLS
> fs/smb/client: Use common code in client
> fs/jfs: Use common ucs2 upper case table
>
> fs/jfs/Kconfig | 1 +
> fs/jfs/Makefile | 2 +-
> fs/jfs/jfs_unicode.h | 17 +-
> fs/jfs/jfs_uniupr.c | 121 -------------
> fs/nls/Kconfig | 8 +
> fs/nls/Makefile | 1 +
> fs/nls/nls_ucs2_data.h | 15 ++
> fs/nls/nls_ucs2_utils.c | 144 +++++++++++++++
> fs/nls/nls_ucs2_utils.h | 285 ++++++++++++++++++++++++++++++
> fs/smb/client/Kconfig | 1 +
> fs/smb/client/cifs_unicode.c | 1 -
> fs/smb/client/cifs_unicode.h | 330 +----------------------------------
> fs/smb/client/cifs_uniupr.h | 239 -------------------------
> fs/smb/server/Kconfig | 1 +
> fs/smb/server/unicode.c | 1 -
> fs/smb/server/unicode.h | 325 +---------------------------------
> fs/smb/server/uniupr.h | 268 ----------------------------
> 17 files changed, 467 insertions(+), 1293 deletions(-)
> delete mode 100644 fs/jfs/jfs_uniupr.c
> create mode 100644 fs/nls/nls_ucs2_data.h
> create mode 100644 fs/nls/nls_ucs2_utils.c
> create mode 100644 fs/nls/nls_ucs2_utils.h
> delete mode 100644 fs/smb/client/cifs_uniupr.h
> delete mode 100644 fs/smb/server/uniupr.h
>
> --
> 2.41.0
>
--
-----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 |_______/
Powered by blists - more mailing lists