mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: "Dr. David Alan Gilbert" <linux@treblig.org>,
	Dave Kleikamp <dave.kleikamp@oracle.com>,
	krisman@collabora.com
Cc: sfrench@samba.org, linux-cifs@vger.kernel.org,
	jfs-discussion@lists.sourceforge.net, linkinjeon@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [Jfs-discussion] [PATCH 0/3] dedupe smb unicode files
Date: Wed, 28 Jun 2023 11:01:21 -0400	[thread overview]
Message-ID: <e3b7a5e6-c0b4-244a-a3ce-073db28f0978@talpey.com> (raw)
In-Reply-To: <ZJxGFBzuhU8t5rcx@gallifrey>

On 6/28/2023 10:39 AM, Dr. David Alan Gilbert wrote:
> * Dave Kleikamp (dave.kleikamp@oracle.com) wrote:
>> On 6/28/23 8:46AM, Dr. David Alan Gilbert wrote:
>>> * Dr. David Alan Gilbert (dave@treblig.org) wrote:
>>>> * Tom Talpey (tom@talpey.com) wrote:
>>>>> On 6/27/2023 9:14 PM, linux@treblig.org wrote:
>>>>>> From: "Dr. David Alan Gilbert" <linux@treblig.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.
>>
>> I'd suggest make it generic and move it to fs/nls/. I'd run it by the nls
>> maintainers, but I don't think there are any.
> 
> Steve & Tom - would you be OK with that?

It's fine with me but there are "CifsUni<foo>" and "SmbUni<foo>" entry
points which will look odd in fs/nls. I'd be fine with removing those
dialect-specific Cifs/Smb prefixes, but there might be some collisions
to work out.

Tom.

> (Copying in Gabriel Bertazi, owner of fs/unicode; although this isn't
> utf-8)
> 
> Dave
> 
>> Shaggy
>>
>>>
>>> Dave
>>>
>>>> Dave
>>>>
>>>>> Tom.
>>>>>
>>>>>>     fs/smb/server/unicode.c                       |   1 -
>>>>>>     fs/smb/server/unicode.h                       | 301 +----------------
>>>>>>     8 files changed, 298 insertions(+), 993 deletions(-)
>>>>>>     delete mode 100644 fs/smb/client/cifs_uniupr.h
>>>>>>     rename fs/smb/{server/uniupr.h => common/cifs_unicode_common.c} (50%)
>>>>>>     create mode 100644 fs/smb/common/cifs_unicode_common.h
>>>>>>
>>>> -- 
>>>>    -----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   |_______/

  reply	other threads:[~2023-06-28 15:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28  1:14 linux
2023-06-28  1:14 ` [PATCH 1/3] fs/smb: Remove unicode 'lower' tables linux
2023-06-28  1:14 ` [PATCH 2/3] fs/smb: Swing unicode common code from server->common linux
2023-06-28 15:06   ` Namjae Jeon
2023-06-28 17:31     ` Dr. David Alan Gilbert
2023-06-28  1:14 ` [PATCH 3/3] fs/smb/client: Use common code in client linux
2023-06-28 13:15 ` [PATCH 0/3] dedupe smb unicode files Tom Talpey
2023-06-28 13:41   ` Dr. David Alan Gilbert
2023-06-28 13:46     ` Dr. David Alan Gilbert
2023-06-28 14:02       ` [Jfs-discussion] " Dave Kleikamp
2023-06-28 14:11         ` Tom Talpey
2023-06-28 14:39         ` Dr. David Alan Gilbert
2023-06-28 15:01           ` Tom Talpey [this message]
2023-06-28 15:03           ` Steve French
2023-06-28 15:13             ` Dr. David Alan Gilbert
2023-06-28 14:02       ` Steve French
2023-06-28 14:17       ` [Jfs-discussion] " Dave Kleikamp
2023-06-28 14:47         ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3b7a5e6-c0b4-244a-a3ce-073db28f0978@talpey.com \
    --to=tom@talpey.com \
    --cc=dave.kleikamp@oracle.com \
    --cc=jfs-discussion@lists.sourceforge.net \
    --cc=krisman@collabora.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®