From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796265679; b=llgeqz8P2pNPmQVRUQTzeUrqmaH3U/DSIueRohJ5MQW3hegRZ/e0GULPvc8eEEBFqIhn qV4lbyoicxLM2xHxELZsq87vTd9iI+CurVA936bP+c9W4FSfrkPzrhs6c5Irk13OKm4Gv eV8VcAahaRv9l18pxAozZkzGJiyhO0m0rcvUD5wcbnIQP/1wadFTfy8aCg9NViUkL588X MdqunXt9Cfr2I+rcFaPjeq1CaS0pVzLVnjkGoXdtuXR0FNznSYLy1ripgPQX2jFJe5DCC RP7w+3ujvpX/DNSw7FvwrmZP38wHmNj+qId3ZEqnefIzHYyKa3V0XsuKx9PttBS2wzg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796265679; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=uKnFhyi7GPMH4mmXGTANUAn79RXi1xOwPgvVMU5OEDY=; b=HPWCR4GPuKTFUu0VM7a2LGsO1Rm1Tiaq9PSTTHjJxu+orMuEU3lD4w4NqXRyBJB7vefV ypUQPAdqNt8AWZvZIGnPHG41Gg5FBmqc+qN/dE4onoL+kZQbw9SE7Afrzaea/ld0uyZ8b 5aTDComFVHxYcl95eimmA5RYhuYlqlcSDnxgvD4yl7TDYJttqgHwIdq33bjjz+b1Lv0zo 7EX301mH+dH+LH9DDoGCxmNS5u/xMIy9HgKPszBWtrV07nM1oAgV/sCfk9EtYs/cOU9jG RFR+kHe7dSNO4x7cjYpjZgvdQmQGQW4fIaPoqIIHmj6IKAjWyQdu+ZfxxepGLuN0A4Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=CheIBSiY; arc=none smtp.remote-ip=74.125.82.180 Received: from mail-dy1-f180.google.com (mail-dy1-f180.google.com [74.125.82.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7F10606A330 for ; Thu, 3 Dec 2026 02:41:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E7F10606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=CheIBSiY Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-386c71feeeaso11826628eec.0 for ; Wed, 02 Dec 2026 18:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1796265678; x=1796870478; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uKnFhyi7GPMH4mmXGTANUAn79RXi1xOwPgvVMU5OEDY=; b=CheIBSiYEzGHXgAklL1J2Lh1hd9EwOZ3lKXDO7xlBVfQu3r4e79EzTkPAfLc1Jywpx wPQKbsd1l3bY6l9OMxNdq+Pcqzya5155KYmeuhqxYkcE7/hx+QsgO+vu67vEJ6xH/2ET imjdxp/ZPktaXMwp6j2bd6CBYLKE3hTG4IWQ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796265678; x=1796870478; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uKnFhyi7GPMH4mmXGTANUAn79RXi1xOwPgvVMU5OEDY=; b=DKUHcyLSSH/mahcmzxhZxW3kO/YiFUaqjcfvVsRju9pnDVs/VkjnuJ4rJPONMq8qP4 72KYFfeDbnTDhnwM18DENZFAyp4NfvjMOoAchwIJEwyrN7BSHcuq9RFiU3cUJ+R9BCAl SYcU75E/s4lMNnhsETq7hbJ3qJzU5lhwdIkerKuDDKvHe8Mu8Rms1+Cjs9/2LhfuIiy2 GAKZ2JrShSeq4yQq87iXI4NC9KTHz1U6TOsbhRhEJlcqsFUnVqtuAE21zLgYwxnNkpRb JJr+1oqUH8qZgggEmeW4b2C69YTWw9TXDsnN+NDbj2VoC6yB2LVbKCaXYjPr/Pld0RK3 thMA== X-Forwarded-Encrypted: i=1; AL+hErHX4ViJ8uO/T2Dk4PP1chiGaw9Ds7/GbT6QZDB+b1+qW1QmeB2LE+el1kjtQW+uWeWsDQo152kx8WiKtQ==@vger.kernel.org X-Gm-Message-State: APuU4Z93ezTCltysZ3wUGx+9K5Yc1JdqKmWBqpiPu3Bw3KnI1Hyl5oxn xPEJzgehNmwFXTad5tP3wuL+hxqQCt3qF+ubgnggmD4AfnBq/uqatL+ndwjikea+Dg== X-Gm-Gg: AZFdTZeDQCbS34dSZ2YUn8fFj5a+yZWH2aqQrTZEsAgxFZeCwdEANI2Em772wjFW3m5 poV93xjJ951N60kd/N0aYfUUZXEhNnTVwW9yghTvqewla43KrFQ9m0SQvctgzCQ520YLJ6G4Oau zE+eoVLYzqjC749pP1993iFOxEG7tYKyhla3euSq5MYqjfY3xZLe7oThNJp5dJ6HOvPvfCuv2Zu iTf8pMoTtMJ8zZojsZDbJwuThBR368SRKn/5A9l+nuE1BBJ7CWqCG9hybvIqKUTavW4ZjM70mmX UwBGZc/5qKfMc3OIoM2dRKKjIwl6A+8w3zJQFrxYhWnAToDjSjRsjZ/YUKAL82YWNJtSP6hJ4/Z YxI18uh3wpsSt/0zGFdjdt4urH2bHE6BvNAFEXA+uTOzYvc3Q4UQErJdbFNh0FLA9xzR3xp0q9x fwP5cjlJHaVovSEzdo7kxQ+G5t2+3MR68F6QnZXHJYBd3LrtBwNhYVkM9u1LEIyMOY0ryqItL4b SICEdCw3lj2+jnAD3DCLycO40oBQg7I49zftdf5oW+18CVEvASL1WiBmzI6Y3or1RCH2SL/LYzw tnB25yad6UiT35H0Yb4opmV33TQMX3Nj7h2RJ8bJmi/nTA6MJmkpa9EbbuJu/D9/QiBf3aqOZMX ZQzTDVaAQ/8u0EA== X-Received: by 2002:a05:693c:65c5:b0:386:b5ce:4627 with SMTP id 5a478bee46e88-386b5ce496bmr29584568eec.30.1796265677994; Wed, 02 Dec 2026 18:41:17 -0800 (PST) Received: from google.com ([2a00:79e0:2031:6:e18c:e957:aa04:7114]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386b9bdafb5sm89953363eec.9.2026.12.02.18.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 18:41:17 -0800 (PST) Date: Thu, 3 Dec 2026 11:41:08 +0900 From: Sergey Senozhatsky To: Michal Wilczynski Cc: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Richard Henderson , Matt Turner , Magnus Lindholm , Russell King , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Minchan Kim , Sergey Senozhatsky , Jens Axboe , Andrew Morton , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-s390@vger.kernel.org, linux-block@vger.kernel.org, Yann Collet , Nick Terrell , Gao Xiang , Chao Yu , Jaegeuk Kim , Eric Biggers , Herbert Xu , David Laight , Sungguk , Jaehoon Chung , Marek Szyprowski , linux-erofs@lists.ozlabs.org, linux-f2fs-devel@lists.sourceforge.net, linux-crypto@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, Jonathan Corbet , "S. Biplab Raut" Subject: Re: [PATCH v3 04/18] zram: lz4/lz4hc: size the streams by the library's constants Message-ID: References: <20261202-lz4-vendor-upstream-v3-0-a53bffa82fbb@samsung.com> <20261202-lz4-vendor-upstream-v3-4-a53bffa82fbb@samsung.com> X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261202-lz4-vendor-upstream-v3-4-a53bffa82fbb@samsung.com> On (26/12/02 18:32), Michal Wilczynski wrote: > gives the size of a compression stream as > LZ4_MEM_COMPRESS and LZ4HC_MEM_COMPRESS, and lz4_create() and > lz4hc_create() allocate by them. The dictionary streams and the per-page > memcpy() use sizeof() instead, and BUILD_BUG_ON()s tie the two together. > > Use the constants throughout. The vendored library that replaces the > fork later in this series declares LZ4_stream_t and LZ4_streamHC_t as > incomplete types, as upstream does, so sizeof() stops compiling; the > library asserts the constants against upstream's layout at build time > instead. > > lz4hc allocates its streams by lz4hc_mem_compress(params->level): with > the vendored library, levels 10 and up need a workspace after the state. > The per-page memcpy() keeps copying LZ4HC_MEM_COMPRESS bytes, the state > alone, since the workspace holds nothing between calls. > > Signed-off-by: Michal Wilczynski Reviewed-by: Sergey Senozhatsky From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81907606A32C for ; Thu, 3 Dec 2026 02:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lists.sourceforge.net header.i=@lists.sourceforge.net header.a=rsa-sha256 header.s=beta header.b=ZynOOTC+; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.a=rsa-sha256 header.s=x header.b=g9vnei+p; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.a=rsa-sha256 header.s=x header.b=CJLClhkA; dkim=neutral header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Dsf3Ciq5 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post:List-Owner; bh=mLDGwTfOBF+WV30wPFXxS16IN8AgkKVg2jLEkcYmars=; b=ZynOOTC+LfQoE/lC6HhY+bZN2S y7cqo4lRL1V7ybhDjaZJyq8X1Uap/WNf22ykslIJmn+BADBLiLRru877wet1kKsTuIiph+UZyg71h 21UWOr7jAhYRswshxmw4G+xlSwtyrssWDQsJ1X3kMZiBPEK9XJK2AGGk9VcXdI/bHIFQ=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xYws9-000000005s1-49zA; Thu, 03 Dec 2026 02:48:37 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xYwrx-000000005rn-35Vv for linux-f2fs-devel@lists.sourceforge.net; Thu, 03 Dec 2026 02:48:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uKnFhyi7GPMH4mmXGTANUAn79RXi1xOwPgvVMU5OEDY=; b=g9vnei+pFviuHOdoOiDY/B+xIC IHM3sgChQ0Yf/06zLRUN3+4j63NONtHmsyt84m5mQYjg9G0Lq+/Ecik0QSfhuR9FTCtym7/4ab/nB yhJNIY8AocikCQm7+/7C9CQeGyJ+D3AuWqrqlmpTU74u51cYhsvPrVU6NDYNedBrhTBg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uKnFhyi7GPMH4mmXGTANUAn79RXi1xOwPgvVMU5OEDY=; b=CJLClhkA/DA68fTo9+Ix0k0XlJ h3ohBT20OTIcZinqzwdF4pxBTuF5hKP/Nj6kXU820T+FfwP/vJXQSq3/J2mahM1afpMeDe0R+GLWo WMrxkAyAk1zOaxUMSyIyuCsiWg5MZfRxYeLS3f9gsSKKhmgIn16lDDTyfqwzZETC+r3M=; Received: from mail-qv1-f48.google.com ([209.85.219.48]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.100.1) id 1xYwrx-000000007h3-0AeR for linux-f2fs-devel@lists.sourceforge.net; Thu, 03 Dec 2026 02:48:25 +0000 Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-92110499585so119914306d6.0 for ; Wed, 02 Dec 2026 18:48:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1796266099; x=1796870899; darn=lists.sourceforge.net; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uKnFhyi7GPMH4mmXGTANUAn79RXi1xOwPgvVMU5OEDY=; b=Dsf3Ciq5qH/rfwpE+3hVXIqOc5n1c4zzO/SkZq30bNLP1Fb9qeDJFSwBU9WWNzdCfK a4sXTO24WaCUipNUjhc78vCC01wLdkjQ7GUVWGk1tmeHq5E4bOvrhYKq98uaPM8itE1V j+53ty5hwiW/c5BZ35WgNeUpXsgCy1OtIxWF8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796266099; x=1796870899; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uKnFhyi7GPMH4mmXGTANUAn79RXi1xOwPgvVMU5OEDY=; b=fTM3NsnV6eWefYZN/t4SC8yuybOO3PSO5CWJz6ClLWmgfLKyC81/yqGLQI8aPc+Rfc 0Dn1toq/zJoq/HHXaErtxdJJZLLvO0oO5j0RVygB6m9pU7X40/aprmY7OEMZ4t9YG9oj r1taeKwnbAUg3eezatnqOZIEMcuEmsrW0xG9OXuEn8i1AQDAJwXeLI6lBAPK7sOST96j fiwnfyV9aRl7WaytllG+AbEbi/COG2iJ6i0w994sarxQLsqZGNvrIDY4V09ohZvxOMdu QS1Db4rKRj97iQ2189/hXsdueorutVsJuOmqWgA7ZrbQE7hsOZMsNCw4u2FBKd1Zpe+R 1wFQ== X-Forwarded-Encrypted: i=1; AL+hErFAxwvgvcCc5uv6rJm4bzV07Zro1F1B5+UPnQMV58CABJl4ZzXgZ76MZp7Te4XxKzSxhuIYmc9YlXWQOVVjCSkA@lists.sourceforge.net X-Gm-Message-State: APuU4Z/ZS6p2URpBx0cV6zXC1MNlzmqZG7F7zD8MH5ORq0Nqchhdi0fa Fe4z2YhXJUneXLWAkvfL3kGqlClP/iaduU2bmnGKx+ohJBVtz4jxwP34H7NheUYGlT8gR+agAGf 0yvM= X-Gm-Gg: AZFdTZe4pVkhe2DIK3GADWiJEyeSUEMM/K28jBtPfwGdaQimvI+YHH8hkTR6R6WIQ4P BSpv7VAQ2fgPdrDRbIFlSvwjQebDlHkFG/3fb0RZ8dXrbVzT6sWCxIFam0lQi0rLj5T9BGrg1Xk r/vF2U9byiB/hO/UiHP5zY3x8og6FbgLNeDn7KJlK1bFhlvNHIh9bGlBDvnHpPKqgqiBKwNixUH rYWy4OnhXKVVxUagUejNkdi3oxnunquB1ckiK9daQJ6cIYQZpdifS2ZrPJn2pS31a7L9vmnY9r9 xXPXAEbm/ukPk3N7LGYYuZTeeR1u7PnSpYH1x3hasKwSLIgun6TyIp7H6EHbAAzx2BiiTvQPR3x To8VdjZIR/7UpOvg/m/7WlAIzTnefi5VjyAlF2eM3ih6FlNEwRIX0ydvjonb4o59DbhzO0Ee0PT /hNgWIza6TV0237RnHFo1MyvupQjr6OnUufeDYpeh5s4xOHnvvfRfkg/Gf52TNH1a3OUDMOqH7Q XwbONnhwYqfHLyX9iq9q5Bf6seUyBRfM5Cq8Q6Qf363bkN6uxf8pgJVK9gsAahwPxgE4fZSQJlC 8d/6KM1lAMgZJ3K5OBIkegQlAUXNfDfPXbE2Hvboui/8bJEoY+WARKv4VA1KoJntQpCo X-Received: by 2002:a05:693c:65c5:b0:386:b5ce:4627 with SMTP id 5a478bee46e88-386b5ce496bmr29584568eec.30.1796265677994; Wed, 02 Dec 2026 18:41:17 -0800 (PST) Received: from google.com ([2a00:79e0:2031:6:e18c:e957:aa04:7114]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386b9bdafb5sm89953363eec.9.2026.12.02.18.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 18:41:17 -0800 (PST) Date: Thu, 3 Dec 2026 11:41:08 +0900 From: Sergey Senozhatsky To: Michal Wilczynski Message-ID: References: <20261202-lz4-vendor-upstream-v3-0-a53bffa82fbb@samsung.com> <20261202-lz4-vendor-upstream-v3-4-a53bffa82fbb@samsung.com> X-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20261202-lz4-vendor-upstream-v3-4-a53bffa82fbb@samsung.com> X-Spam-Score: -0.2 (/) X-Headers-End: 1xYwrx-000000007h3-0AeR Subject: Re: [f2fs-dev] [PATCH v3 04/18] zram: lz4/lz4hc: size the streams by the library's constants X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, Dave Hansen , linux-mips@vger.kernel.org, "James E.J. Bottomley" , linux-mm@kvack.org, Bill Wendling , "H. Peter Anvin" , Alexander Gordeev , Sungguk , Marek Szyprowski , linux-s390@vger.kernel.org, Herbert Xu , Magnus Lindholm , Helge Deller , x86@kernel.org, Russell King , Eric Biggers , Ingo Molnar , Yann Collet , Matt Turner , Christian Borntraeger , "S. Biplab Raut" , Sven Schnelle , llvm@lists.linux.dev, Vasily Gorbik , Sergey Senozhatsky , Heiko Carstens , linux-alpha@vger.kernel.org, Richard Henderson , linux-crypto@vger.kernel.org, Nathan Chancellor , Nick Terrell , Borislav Petkov , Jaegeuk Kim , Gao Xiang , linux-arm-kernel@lists.infradead.org, Jens Axboe , linux-block@vger.kernel.org, Thomas Bogendoerfer , linux-parisc@vger.kernel.org, Jonathan Corbet , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Minchan Kim , Thomas Gleixner , Justin Stitt , Andrew Morton , linux-erofs@lists.ozlabs.org, David Laight Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On (26/12/02 18:32), Michal Wilczynski wrote: > gives the size of a compression stream as > LZ4_MEM_COMPRESS and LZ4HC_MEM_COMPRESS, and lz4_create() and > lz4hc_create() allocate by them. The dictionary streams and the per-page > memcpy() use sizeof() instead, and BUILD_BUG_ON()s tie the two together. > > Use the constants throughout. The vendored library that replaces the > fork later in this series declares LZ4_stream_t and LZ4_streamHC_t as > incomplete types, as upstream does, so sizeof() stops compiling; the > library asserts the constants against upstream's layout at build time > instead. > > lz4hc allocates its streams by lz4hc_mem_compress(params->level): with > the vendored library, levels 10 and up need a workspace after the state. > The per-page memcpy() keeps copying LZ4HC_MEM_COMPRESS bytes, the state > alone, since the workspace holds nothing between calls. > > Signed-off-by: Michal Wilczynski Reviewed-by: Sergey Senozhatsky _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel