From patchwork Tue Aug 28 01:36:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Terrell X-Patchwork-Id: 10577737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72807139B for ; Tue, 28 Aug 2018 01:37:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D5C428952 for ; Tue, 28 Aug 2018 01:37:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50A4C29A0E; Tue, 28 Aug 2018 01:37:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBAAF28952 for ; Tue, 28 Aug 2018 01:37:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726216AbeH1F0k (ORCPT ); Tue, 28 Aug 2018 01:26:40 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:50832 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725907AbeH1F0k (ORCPT ); Tue, 28 Aug 2018 01:26:40 -0400 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7S1ZUrE002874 for ; Mon, 27 Aug 2018 18:37:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=xxDKS1YPIvJVnQhUnC2tVYD/fibwajK+KllcDIjZqK4=; b=o3m2OAkJeEydTa7PGnxCF//ojdhvvREc4Ake1X9frTXLk2xt72DFj9L5rW/gCWRzwxdm MH2uKw6bz7THLWEdp1wwO2NBXBV4zPY8rs+UbS3TrSNSttw3aMRHO4MalOsYp84NY7iG miFGqkqvCkYdxh8I+336dUIdq7tpoLQ2Anc= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2m4ry70hru-3 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 27 Aug 2018 18:37:27 -0700 Received: from mx-out.facebook.com (192.168.52.123) by mail.thefacebook.com (192.168.16.23) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 27 Aug 2018 18:37:26 -0700 Received: by devvm4508.prn2.facebook.com (Postfix, from userid 32154) id DBD63674D0F5; Mon, 27 Aug 2018 18:37:12 -0700 (PDT) Smtp-Origin-Hostprefix: devvm From: Nick Terrell Smtp-Origin-Hostname: devvm4508.prn2.facebook.com To: Nick Terrell CC: David Sterba , , , Smtp-Origin-Cluster: prn2c23 Subject: [PATCH 0/3] btrfs: Add zstd support to btrfs Date: Mon, 27 Aug 2018 18:36:51 -0700 Message-ID: <20180828013654.1627080-1-terrelln@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-27_10:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all, This patch set imports the upstream kernel zstd library, patches it to work in grub, adds zstd support to the btrfs module, and adds a test case. I've separated the importing and patching of the upstream kernel zstd library for ease of review. Thanks to David Sterba for starting this project! I started my patch from where he left off. Best, Nick Terrell Nick Terrell (3): Import kernel zstd Patch the kernel zstd Add btrfs zstd support Makefile.util.def | 8 +- grub-core/Makefile.core.def | 10 +- grub-core/fs/btrfs.c | 85 +- grub-core/lib/zstd/bitstream.h | 380 ++++++ grub-core/lib/zstd/decompress.c | 2494 +++++++++++++++++++++++++++++++++++ grub-core/lib/zstd/entropy_common.c | 243 ++++ grub-core/lib/zstd/error_private.h | 52 + grub-core/lib/zstd/fse.h | 575 ++++++++ grub-core/lib/zstd/fse_decompress.c | 329 +++++ grub-core/lib/zstd/huf.h | 212 +++ grub-core/lib/zstd/huf_decompress.c | 957 ++++++++++++++ grub-core/lib/zstd/kerncompat.h | 69 + grub-core/lib/zstd/mem.h | 155 +++ grub-core/lib/zstd/xxhash.c | 482 +++++++ grub-core/lib/zstd/xxhash.h | 236 ++++ grub-core/lib/zstd/zstd.h | 1157 ++++++++++++++++ grub-core/lib/zstd/zstd_common.c | 75 ++ grub-core/lib/zstd/zstd_internal.h | 265 ++++ tests/btrfs_test.in | 1 + tests/util/grub-fs-tester.in | 4 +- 20 files changed, 7783 insertions(+), 6 deletions(-) create mode 100644 grub-core/lib/zstd/bitstream.h create mode 100644 grub-core/lib/zstd/decompress.c create mode 100644 grub-core/lib/zstd/entropy_common.c create mode 100644 grub-core/lib/zstd/error_private.h create mode 100644 grub-core/lib/zstd/fse.h create mode 100644 grub-core/lib/zstd/fse_decompress.c create mode 100644 grub-core/lib/zstd/huf.h create mode 100644 grub-core/lib/zstd/huf_decompress.c create mode 100644 grub-core/lib/zstd/kerncompat.h create mode 100644 grub-core/lib/zstd/mem.h create mode 100644 grub-core/lib/zstd/xxhash.c create mode 100644 grub-core/lib/zstd/xxhash.h create mode 100644 grub-core/lib/zstd/zstd.h create mode 100644 grub-core/lib/zstd/zstd_common.c create mode 100644 grub-core/lib/zstd/zstd_internal.h --- 2.16.2