Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DACFAC10F1A for ; Thu, 9 May 2024 10:06:54 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=ROT2irmc; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VZnjn153nz3cVX for ; Thu, 9 May 2024 20:06:53 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=ROT2irmc; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.97; helo=out30-97.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=lists.ozlabs.org) Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VZnjZ3jxLz30N8 for ; Thu, 9 May 2024 20:06:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1715249194; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=J3n1F++nXn5grP3qUFQmpl6ZntlKdivTqo2NNfMNgHw=; b=ROT2irmcUGTw9xlTeXY8Dd8dQmN7R0peUgl9hs7wn/veqPM9U+dZBF+kr9YYqQI3+MBk9t2qnWbJPlUZ5LVx/+GawAenwjwKl8hsyVKVtmxs2f7lMxJqc7qBBpOVdrmVyswQpGOn6zZ3qv2mBBNvFTQZSMYTaoeIE1L11q4tjhQ= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045075189;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---0W66ngb8_1715249192; Received: from 30.97.48.191(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0W66ngb8_1715249192) by smtp.aliyun-inc.com; Thu, 09 May 2024 18:06:33 +0800 Message-ID: <5de3b4ea-c096-4b0e-80c1-ac5785fd1869@linux.alibaba.com> Date: Thu, 9 May 2024 18:06:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] erofs-utils: add preliminary zstd support To: Yifan Zhao , linux-erofs@lists.ozlabs.org References: <20240508095818.3059914-1-hsiangkao@linux.alibaba.com> From: Gao Xiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On 2024/5/9 17:53, Yifan Zhao wrote: > Hi Gao, > > I found this zstd implementation failed in my smoking test[1] with -Eall-fragments and -Eztailpacking enabled. You could reproduce it with enwik8 workload. > > After a galance I notice that libzstd_compress_destsize() may return a value larger than `dstsize`. I mark it in the code below. That is expected. > > I believe this will break the assumption in its caller and lead to broken image. > > However I'm not an expert of zstd algorithms, could you please take a look at it? > > > [1] https://github.com/SToPire/erofsnightly/actions/runs/9004052391 > I will look into that, thanks! Thanks, Gao Xiang