Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8569134rwp; Wed, 19 Jul 2023 11:45:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEkQTeIlhjapNTsDF9wZYctk4yN1qFZ+YwXPOdMg97gD5KwaEExRONed3ZVr6l/xm6MEffV X-Received: by 2002:a05:6870:e2d0:b0:1b3:8285:153e with SMTP id w16-20020a056870e2d000b001b38285153emr3525606oad.44.1689792308713; Wed, 19 Jul 2023 11:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689792308; cv=none; d=google.com; s=arc-20160816; b=Eq6QEn2lAn0/5LuUjF94MqcKIJIEESUZ8AcakbX3GovlihxO1aGbAELouslnI8VtrL e4dEdYfIbVof0WCWZAHOlX5rbBTNNfVA4gAInZv+HMhUKHv7zMDmqBqxJbSISBCpEp99 iRvi1Vi810bi/PtSPRhSKG7LYL2G1Pg8mujGCS1/6FA8FK6LJg1pAlAlx+4tPjCbUqlw 0f7PWVkBSSBap/wNNPAwMt01IVV+gdVjPKRE5sWk0/JLaD+RdAm7t1w/Rv6JoWq0ad9+ u9t1mXAC0y/eCo+aS/7OVegj2cKZ1AfDMrDyfyD1rO3sadXrS29aUCqzReidZtlCFtlG KMxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=8+XMp8h3m8dCu8neoz5W1i52keRbzheZjzjhOpBzlSo=; fh=VQ5gsFaF9lK9IogpqLTEZcegTdELNt1X+PWOf4KNfWM=; b=m6/m5GoJtWSQsmlz0EQkp2VZgnvm+rVdyPkZjIqSrUral82Kx3wrW2IasDGgEW8a+n 0bdm3HfEDQl7IryEGrxQJHjMskMa1bB9GI0RNnrCh6r/ho9H2U7SIVoVflDTHb4m1Ws4 7Kz5E6ycd7GKMItLY0K2oNlAAAGj92MUZ16ouc/XNLzUi1Fl8CSESzRBqz+NHNFDOevH q9KvFvxausgzVkoWf7SzrCJY+wen89zaSclv/mP0lQzOf7eH76NAnjVFj4P82g54zkFn akIxcCHMhL7EljpPQjiL+H9M/IjYClNWnD9aI6w2e4C82aSD+z4S+z/ttV3LH4brSWjW PuMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=srpU9Lvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x185-20020a6386c2000000b0055e2bb303b5si3700597pgd.881.2023.07.19.11.44.56; Wed, 19 Jul 2023 11:45:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=srpU9Lvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbjGSR4m (ORCPT + 99 others); Wed, 19 Jul 2023 13:56:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjGSR4h (ORCPT ); Wed, 19 Jul 2023 13:56:37 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CCBE2101; Wed, 19 Jul 2023 10:56:30 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b9352ff1aeso68509721fa.1; Wed, 19 Jul 2023 10:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689789389; x=1690394189; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8+XMp8h3m8dCu8neoz5W1i52keRbzheZjzjhOpBzlSo=; b=srpU9LvvLcII1UinIHpxS2X9G5nD1jhKi8rB1amEkHn2FpIORNq8uRlKumxPNPg85h ubcU8Lx44ngV/Db65GlJTDg6BMfirT34yxTZgadMD4aqA4VgkiGCaD8QsIa7sMpgirEq Y/Mf+a6VT18TEb5XcT1PriTTe5qkM1GQEUebmDa0sqIEnThMNAcsR+qyALujpzOJakVe 6jPgfgZRA+VZjwsJgB8kcpbGcDYDuZCrrXkih4FHAjx2YweQ7tcmFO27y4V7z56xuSPK 2b/kMuZjbJ9W7CM7Ehk0IHsTE2fSTeehtTLYPhoasQ3CFpDipu4Wg73bJXk3+nbSk6sM AbVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689789389; x=1690394189; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8+XMp8h3m8dCu8neoz5W1i52keRbzheZjzjhOpBzlSo=; b=RXgO9durO7t7MJ69xC32FgnVt6v3AtNU/ENF/p5E6KCBgzBDXB6tihJ/Y4ZNaWO/5P 62jXSe7GhaTqBIwOe5G7En2hoBGIppfHNYZCTSYUP+KW6aCU6Zj3WB2hMXjZaL6pe7ks T+90jQzn5h3tVn2zA8yitzty5pRC+E9nscgISzHEaUguBpGT9qkSKL5YpIDF+lBuXiTi et0GwGwfR3s0+ffDVMlagFZRzSChjmVq+uRVMfvikdtCRqM8kcBKLCaf/Xhm1O4HUuJa H4q3ZQqO+TZ0m75ZzmFpVlTcijcClkrZQPD2bwO5FtxM+UDpPR2NvAlJdSyOOV7DlIHM B1sw== X-Gm-Message-State: ABy/qLZXMC72Ft1VqyxZldq0dcb87JHtQAKf6x4LcBKclXaSWj8dY1md YvG8jVLG2YYLAEZUNJ+LJ8b8frkqXjPygXi2izw= X-Received: by 2002:a2e:6e13:0:b0:2b6:e2c1:6cda with SMTP id j19-20020a2e6e13000000b002b6e2c16cdamr12642ljc.46.1689789388374; Wed, 19 Jul 2023 10:56:28 -0700 (PDT) MIME-Version: 1.0 References: <20230628232417.120844-1-linux@treblig.org> In-Reply-To: From: Steve French Date: Wed, 19 Jul 2023 12:56:17 -0500 Message-ID: Subject: Re: [PATCH v2 0/4] dedupe smb unicode files To: "Dr. David Alan Gilbert" Cc: linkinjeon@kernel.org, tom@talpey.com, dave.kleikamp@oracle.com, shaggy@kernel.org, linux-cifs@vger.kernel.org, krisman@collabora.com, jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No objections to this on my part. If Shaggy is ok with the JFS change, we could target it for 6.6-rc1 if it tests out ok On Wed, Jul 12, 2023 at 6:28=E2=80=AFPM Dr. David Alan Gilbert wrote: > > * linux@treblig.org (linux@treblig.org) wrote: > > From: "Dr. David Alan Gilbert" > > > > 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 |_______/ --=20 Thanks, Steve