Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2500166pxb; Sun, 31 Oct 2021 17:45:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJvwl7kvGPjWnqwA0JyxyD6Kz4/X6+yJQWN7zbLrtNAhU/RsSxKxj2eYYUxdJMmJOyk3yl X-Received: by 2002:a17:906:2505:: with SMTP id i5mr32671660ejb.450.1635727504237; Sun, 31 Oct 2021 17:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635727504; cv=none; d=google.com; s=arc-20160816; b=URFIBznQBUf/SxDq+cx+/DRgSC9GO1xqf5e8CXkgEo7MCx6z031QfdNY9H2QUvLoup 1/f5VBI3qdKbIqZLtuN/GEMy88izS/Qkm/dns1q81z466ZpD+mFt+wCSVh/hy3OyZi/K jy/IcfTBZMHoHBJsnIXfhAO8IkjrNWNN59CCWuLYM3auRK8ZvaBjPYfXXAocCSCSCjHe etUMRvJ3vkqWJyzsEDDMyTgJCWiyXHf056mq31W5NZpz9qM8Bwk0UhSJ83FOcOhVS4v3 WePizmNPBzHM+j//WMPTMphKQNl1UOkHnK/n1NaNFccMpAJNQNBRY4X14foxKs8QHKxI Nkzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :mail-followup-to:message-id:subject:cc:to:from:date:dkim-signature; bh=BMByHEJYKw4Cb6+0sfVtNwzxmwqEvOb7nfVeZcYHNZI=; b=OGWzXUH8zt/1tudRgAItdPpV3i8kdcT8SOglZLZM1+ClCTrAfzsnf7khTPjt8oZOgj ob8k2UXOYcM7e2qYrUYWTymARuzIe7b6+5VvzafawWqirdstOE9rs6k0nDCGNeKkK6lB a5vFOd5zdC5/CHK90qij/jqHyOv8vyc/+OVc186a7Tw9GOE4VjhFSpAsCgEExFPM0KJ6 oesqfiS7/iilhOXmR0U8j9T4iDVv0OGyJmhFLmOsLMEvjy0Agie1zrAZ7idOWOHJhWLZ tQ3bzejU9w6u4Drl3Vv5Yy3ksSQocJpZyfKs4faIboiMOivuSm82XPVPzvYsLB/3Eb/g oCdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YnZYb/Tc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si17967304edn.504.2021.10.31.17.44.40; Sun, 31 Oct 2021 17:45:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YnZYb/Tc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbhKAAn3 (ORCPT + 99 others); Sun, 31 Oct 2021 20:43:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:42786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhKAAn2 (ORCPT ); Sun, 31 Oct 2021 20:43:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA3B760E90; Mon, 1 Nov 2021 00:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635727248; bh=2uUhdauGw92C8QxzP01fb14EoJ7ezdWDgs1/7QdKx6s=; h=Date:From:To:Cc:Subject:From; b=YnZYb/Tcg35l7Os151X8BDLQDvWmCdP4YJNNfTWbm99w4W/ck5sK2v3YMw8ZXSKaY OMs8LvYESjw5cIyGQvuPKPsDjxpQzBXrNCDdqD9vyezvqp7flnpjMZWlkEvbuL8kPp 4+/EHPM1empXX1m4BoWEa2gb+2TlPR5n2CTOgAu1qvacMC5K2Iv2+oBTkJdgJ/lTZA btzuagRKLVGm9eH63kuZbLFUCxYDyglMmJ7bQnwWGhmx2btLeD5I3GFSi35aco0xHr EcuUvD9Ogr6KkyEM/LlFMQ3K0ttV3J9AGGbN5JrS8ed6WALQnaFIJWzlyCdUOHyVN0 KBh/j4+oTQtGA== Date: Mon, 1 Nov 2021 08:40:32 +0800 From: Gao Xiang To: Linus Torvalds Cc: LKML , linux-erofs@lists.ozlabs.org, Lasse Collin , Andrew Morton , Chao Yu , Yue Hu , Miao Xie , Liu Bo , Peng Tao , Joseph Qi , Liu Jiang Subject: [GIT PULL] erofs updates for 5.16-rc1 Message-ID: <20211101003654.GA23732@hsiangkao-HP-ZHAN-66-Pro-G1> Mail-Followup-To: Linus Torvalds , LKML , linux-erofs@lists.ozlabs.org, Lasse Collin , Andrew Morton , Chao Yu , Yue Hu , Miao Xie , Liu Bo , Peng Tao , Joseph Qi , Liu Jiang MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Could you consider this pull request for 5.16-rc1? There are some new features available for this cycle. Firstly, EROFS LZMA algorithm support, specifically called MicroLZMA, is available as an option for embedded devices, LiveCDs and/or as the secondary auxiliary compression algorithm besides the primary algorithm in one file. In order to better support the LZMA fixed-sized output compression, especially for 4KiB pcluster size (which has lowest memory pressure thus useful for memory-sensitive scenarios), Lasse introduced a new LZMA header/container format called MicroLZMA to minimize the original LZMA1 header (for example, we don't need to waste 4-byte dictionary size and another 8-byte uncompressed size, which can be calculated by fs directly, for each pcluster.) and enable EROFS fixed-sized output compression. Note that MicroLZMA can also be later used by other things in addition to EROFS too where wasting minimal amount of space for headers is important and it can be only compiled by enabling XZ_DEC_MICROLZMA. MicroLZMA has been supported by the latest upstream XZ embedded [1] & XZ utils [2], apply the latest related XZ embedded upstream patches by the XZ author Lasse here. Secondly, multiple device is also supported in this cycle, which is designed for multi-layer container images. By working together with inter-layer data deduplication and compression, we can achieve the next high-performance container image solution. Our team will announce the new Nydus container image service [3] implementation with new RAFS v6 (EROFS-compatible) format in Open Source Summit 2021 China [4] soon. Besides, the secondary compression head support and readmore decompression strategy are also included in this cycle. There are also some minor bugfixes and cleanups, as always. All commits have been tested and have been in linux-next. This merges cleanly with master. [1] https://git.tukaani.org/?p=xz-embedded.git [2] https://git.tukaani.org/?p=xz.git [3] https://github.com/dragonflyoss/image-service [4] https://kccncosschn21.sched.com/event/pcdL/erofsdaelsju-nanojdyags-erofs-what-are-we-doing-now-for-containers-xiang-gao-alibaba Thanks, Gao Xiang The following changes since commit 9e1ff307c779ce1f0f810c7ecce3d95bbae40896: Linux 5.15-rc4 (2021-10-03 14:08:47 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git tags/erofs-for-5.16-rc1 for you to fetch changes up to a0961f351d82d43ab0b845304caa235dfe249ae9: erofs: don't trigger WARN() when decompression fails (2021-10-31 21:00:28 +0800) ---------------------------------------------------------------- Changes since last update: - support multiple devices for multi-layer container images; - support the secondary compression head; - support readmore decompression strategy; - support new LZMA algorithm (specifically called MicroLZMA); - some bugfixes & cleanups. ---------------------------------------------------------------- Gao Xiang (9): erofs: decouple basic mount options from fs_context erofs: add multiple device support erofs: get compression algorithms directly on mapping erofs: introduce the secondary compression head erofs: introduce readmore decompression strategy erofs: rename some generic methods in decompressor erofs: lzma compression support erofs: get rid of ->lru usage erofs: don't trigger WARN() when decompression fails Lasse Collin (5): lib/xz: Avoid overlapping memcpy() with invalid input with in-place decompression lib/xz: Validate the value before assigning it to an enum variable lib/xz: Move s->lzma.len = 0 initialization to lzma_reset() lib/xz: Add MicroLZMA decoder lib/xz, lib/decompress_unxz.c: Fix spelling in comments Yue Hu (1): erofs: remove the fast path of per-CPU buffer decompression Documentation/filesystems/erofs.rst | 12 +- fs/erofs/Kconfig | 40 +++-- fs/erofs/Makefile | 1 + fs/erofs/compress.h | 28 ++-- fs/erofs/data.c | 73 +++++++-- fs/erofs/decompressor.c | 139 ++++++----------- fs/erofs/decompressor_lzma.c | 290 ++++++++++++++++++++++++++++++++++++ fs/erofs/erofs_fs.h | 73 ++++++--- fs/erofs/inode.c | 2 +- fs/erofs/internal.h | 105 +++++++++++-- fs/erofs/pcpubuf.c | 6 +- fs/erofs/super.c | 231 ++++++++++++++++++++++------ fs/erofs/utils.c | 19 ++- fs/erofs/xattr.c | 4 +- fs/erofs/zdata.c | 175 +++++++++++++++------- fs/erofs/zdata.h | 7 - fs/erofs/zmap.c | 65 +++++--- include/linux/xz.h | 106 +++++++++++++ include/trace/events/erofs.h | 2 +- lib/decompress_unxz.c | 10 +- lib/xz/Kconfig | 13 ++ lib/xz/xz_dec_lzma2.c | 182 +++++++++++++++++++++- lib/xz/xz_dec_stream.c | 6 +- lib/xz/xz_dec_syms.c | 9 +- lib/xz/xz_private.h | 3 + 25 files changed, 1281 insertions(+), 320 deletions(-) create mode 100644 fs/erofs/decompressor_lzma.c