From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DC1BC43460 for ; Mon, 26 Apr 2021 23:41:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F29461103 for ; Mon, 26 Apr 2021 23:41:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237425AbhDZXmd (ORCPT ); Mon, 26 Apr 2021 19:42:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237368AbhDZXmb (ORCPT ); Mon, 26 Apr 2021 19:42:31 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C577BC061574; Mon, 26 Apr 2021 16:41:49 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id p12so41088102pgj.10; Mon, 26 Apr 2021 16:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zdyCdL1O6MHAZHMO3v3t2Hk2heeS+Nt7HrJ8IUq+ohk=; b=qG3AVIVOlh+jJAOJ/ofL/jF064Kdo+t1ZiyY6bwAW3+1Lc7RHlrWp+TJUJsEiP/YMb sX6Yq29euQNHsthnAyeGOC4Rorfs1B821jugW16rtBwkZi2FOVHInyRwY9p10HrNRuec x8tIHvo57UGYouJ31Fymm9TgAEbKcoXmlPxTPMxTgtbXiijTTQe5QromLPe4BmYVVd7g eNMMftuRueq/3z/ocASgs2oHugUz3eutvdih9+Ao2/IyBSi8nNY9ublhgFhzLFLH7r8h buUS4nltPkoh7Op69X12o4ghAJhj/uv5d0vh4hwRNkzg8qA9O6o4v4D0I2jmkBAN/nV1 CzAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zdyCdL1O6MHAZHMO3v3t2Hk2heeS+Nt7HrJ8IUq+ohk=; b=tgCgBW22qj9D+X8dCPdpHNZulx2Pbei+1uqBLIqDcSO4A7YcKEBiRJ8kseVYv14aRL m2/AHXUp3ITXDK4dhBKu7uSWhimEUt1N5Fzz9/zQaBl17Xn+lBp9wO2DPV8Ync7qltCL xCtXR5VlyUekr0/aIM6lV+dfs7ri7UG3wTZU9brPL3UMMUpbqZsln/I/O54BYnG2smoC 1vi/gulL5DFVYG6JbAziSHWwJHG8HhlKFoiIdIv3mLzTozS3vAow2LAB/PHiUjo721Lp SD1FqZZ/aPu+p6OShItYnxL4lyYPOL7E7UBckMGG0fNL/UqsdoUh9NY3hfMhe2U5lQsn MRaw== X-Gm-Message-State: AOAM5325UYxCIduP2Mwg/nBC7KFEVEVWfQJp23zbYKgigsxFW62dbqj/ Uj3ZSwu4EdbnMKB8FCBWtPE= X-Google-Smtp-Source: ABdhPJwNMzveK5M3WOq6bGS5Dy35S6A+cXn6A21maNSg0rPzd/8N2wfhp/TFPPiKuoKq/hEF7DwaXQ== X-Received: by 2002:a05:6a00:1a4a:b029:261:d9ed:fd80 with SMTP id h10-20020a056a001a4ab0290261d9edfd80mr20213974pfv.20.1619480509313; Mon, 26 Apr 2021 16:41:49 -0700 (PDT) Received: from nickserv.localdomain (c-98-33-101-203.hsd1.ca.comcast.net. [98.33.101.203]) by smtp.gmail.com with ESMTPSA id m7sm640828pfc.218.2021.04.26.16.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 16:41:48 -0700 (PDT) From: Nick Terrell To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-btrfs@vger.kernel.org, squashfs-devel@lists.sourceforge.net, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Kernel Team , Nick Terrell , Nick Terrell , Chris Mason , Petr Malat , Johannes Weiner , Niket Agarwal , Yann Collet , Christoph Hellwig , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , David Sterba , Oleksandr Natalenko , Felix Handte , Eric Biggers Subject: [PATCH v10 2/4] lib: zstd: Add decompress_sources.h for decompress_unzstd Date: Mon, 26 Apr 2021 16:46:19 -0700 Message-Id: <20210426234621.870684-3-nickrterrell@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210426234621.870684-1-nickrterrell@gmail.com> References: <20210426234621.870684-1-nickrterrell@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we just need to update decompress_sources.h. Signed-off-by: Nick Terrell --- lib/decompress_unzstd.c | 6 +----- lib/zstd/decompress_sources.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 lib/zstd/decompress_sources.h diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c index c88aad49e996..6e5ecfba0a8d 100644 --- a/lib/decompress_unzstd.c +++ b/lib/decompress_unzstd.c @@ -68,11 +68,7 @@ #ifdef STATIC # define UNZSTD_PREBOOT # include "xxhash.c" -# include "zstd/entropy_common.c" -# include "zstd/fse_decompress.c" -# include "zstd/huf_decompress.c" -# include "zstd/zstd_common.c" -# include "zstd/decompress.c" +# include "zstd/decompress_sources.h" #endif #include diff --git a/lib/zstd/decompress_sources.h b/lib/zstd/decompress_sources.h new file mode 100644 index 000000000000..d82cea4316f5 --- /dev/null +++ b/lib/zstd/decompress_sources.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* + * This file includes every .c file needed for decompression. + * It is used by lib/decompress_unzstd.c to include the decompression + * source into the translation-unit, so it can be used for kernel + * decompression. + */ + +#include "entropy_common.c" +#include "fse_decompress.c" +#include "huf_decompress.c" +#include "zstd_common.c" +#include "decompress.c" -- 2.31.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32DEBC43460 for ; Mon, 26 Apr 2021 23:42:04 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCE4F61168; Mon, 26 Apr 2021 23:42:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCE4F61168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lbArb-0002H4-AO; Mon, 26 Apr 2021 23:42:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbArY-0002G6-N8; Mon, 26 Apr 2021 23:42:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zdyCdL1O6MHAZHMO3v3t2Hk2heeS+Nt7HrJ8IUq+ohk=; b=FrZejzgsGvZ4R1JhWuOD4VSlqi IyL5KIveBEvZbsnfjLsS1t8qFnjBlgT8a6otH1a+Fih1Vqn7DmzFQQjafsIUUqpI4eX0lVsdjfdMD tFXhQ8wpASYL0wBT1AV1nKB5g6ujZzwbHkD6B5hwx84U1iBmbCP0GcCH8Hvr+REo0Ifo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zdyCdL1O6MHAZHMO3v3t2Hk2heeS+Nt7HrJ8IUq+ohk=; b=PfCJmeIbG6Ynux1aTtag8f8U/N 8XHcm4uSInTkiiXRslhh0eyVK6k+AD78Tm1Is30Glq/LYXVq1gvNpJXes28Xb8yT8VZJyHuJV4s1u TLrmc/sDAChT3B9UUsYt69pSlHBiwxezYhVqHrwIASIVNg8a4uYWV84EKeVDEjPFsR6c=; Received: from mail-pf1-f177.google.com ([209.85.210.177]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1lbArS-0006Uz-KC; Mon, 26 Apr 2021 23:41:59 +0000 Received: by mail-pf1-f177.google.com with SMTP id d124so40055109pfa.13; Mon, 26 Apr 2021 16:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zdyCdL1O6MHAZHMO3v3t2Hk2heeS+Nt7HrJ8IUq+ohk=; b=qG3AVIVOlh+jJAOJ/ofL/jF064Kdo+t1ZiyY6bwAW3+1Lc7RHlrWp+TJUJsEiP/YMb sX6Yq29euQNHsthnAyeGOC4Rorfs1B821jugW16rtBwkZi2FOVHInyRwY9p10HrNRuec x8tIHvo57UGYouJ31Fymm9TgAEbKcoXmlPxTPMxTgtbXiijTTQe5QromLPe4BmYVVd7g eNMMftuRueq/3z/ocASgs2oHugUz3eutvdih9+Ao2/IyBSi8nNY9ublhgFhzLFLH7r8h buUS4nltPkoh7Op69X12o4ghAJhj/uv5d0vh4hwRNkzg8qA9O6o4v4D0I2jmkBAN/nV1 CzAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zdyCdL1O6MHAZHMO3v3t2Hk2heeS+Nt7HrJ8IUq+ohk=; b=EAh4oRWQD/o8syoKe4xysNR2haguAxlhRVmZQqnvtvHcA5WO7ZhsD1hbjhmpX60n3I z6W5o16fOpGFnA1tjlNPXwMY18tauA8oDp/tEKcaiLFfobduBJk6cousT1/URruKvIZK kMbCujTblglqfu0bQnjNcBKBQNpSGwqjgw91Pr7Xkp8kT6xJae6eSfXVqs2SRwsiN01c 56aynscKErL0X/xhHWoYoV0PVLXBhTPuUmDvL9vi59FAXaDJIPRSuHiAOJ+n1dgXOC8d JSK3KHVBIrEtKWu9KM6sfmquqOcTdHnTa58e/T18xVsz8YdbawzNs6iAlNLQqZCmgHeb ijKg== X-Gm-Message-State: AOAM532j7IV4FxnoaGHAs0awG7hyc2rMDprkpdJ7G+nEiSKk1mHQvr7R ae02SjllrT+xwJ/5X8NHWeI= X-Google-Smtp-Source: ABdhPJwNMzveK5M3WOq6bGS5Dy35S6A+cXn6A21maNSg0rPzd/8N2wfhp/TFPPiKuoKq/hEF7DwaXQ== X-Received: by 2002:a05:6a00:1a4a:b029:261:d9ed:fd80 with SMTP id h10-20020a056a001a4ab0290261d9edfd80mr20213974pfv.20.1619480509313; Mon, 26 Apr 2021 16:41:49 -0700 (PDT) Received: from nickserv.localdomain (c-98-33-101-203.hsd1.ca.comcast.net. [98.33.101.203]) by smtp.gmail.com with ESMTPSA id m7sm640828pfc.218.2021.04.26.16.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 16:41:48 -0700 (PDT) From: Nick Terrell To: Herbert Xu Date: Mon, 26 Apr 2021 16:46:19 -0700 Message-Id: <20210426234621.870684-3-nickrterrell@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210426234621.870684-1-nickrterrell@gmail.com> References: <20210426234621.870684-1-nickrterrell@gmail.com> MIME-Version: 1.0 X-Headers-End: 1lbArS-0006Uz-KC Subject: [f2fs-dev] [PATCH v10 2/4] lib: zstd: Add decompress_sources.h for decompress_unzstd X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: squashfs-devel@lists.sourceforge.net, Eric Biggers , Johannes Weiner , Christoph Hellwig , Nick Terrell , Yann Collet , David Sterba , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Petr Malat , Chris Mason , Nick Terrell , linux-crypto@vger.kernel.org, Felix Handte , Oleksandr Natalenko , Kernel Team , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Niket Agarwal , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we just need to update decompress_sources.h. Signed-off-by: Nick Terrell --- lib/decompress_unzstd.c | 6 +----- lib/zstd/decompress_sources.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 lib/zstd/decompress_sources.h diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c index c88aad49e996..6e5ecfba0a8d 100644 --- a/lib/decompress_unzstd.c +++ b/lib/decompress_unzstd.c @@ -68,11 +68,7 @@ #ifdef STATIC # define UNZSTD_PREBOOT # include "xxhash.c" -# include "zstd/entropy_common.c" -# include "zstd/fse_decompress.c" -# include "zstd/huf_decompress.c" -# include "zstd/zstd_common.c" -# include "zstd/decompress.c" +# include "zstd/decompress_sources.h" #endif #include diff --git a/lib/zstd/decompress_sources.h b/lib/zstd/decompress_sources.h new file mode 100644 index 000000000000..d82cea4316f5 --- /dev/null +++ b/lib/zstd/decompress_sources.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* + * This file includes every .c file needed for decompression. + * It is used by lib/decompress_unzstd.c to include the decompression + * source into the translation-unit, so it can be used for kernel + * decompression. + */ + +#include "entropy_common.c" +#include "fse_decompress.c" +#include "huf_decompress.c" +#include "zstd_common.c" +#include "decompress.c" -- 2.31.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel