From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4704623183B for ; Sat, 18 Apr 2026 06:16:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776492999; cv=none; b=W6nmf0JtUTGs/7QiROQZi9UU6NHmB4gLIxvFzEVF0k06ZPRvkx0kKHyL5It8PM06W/sVg8hNsS/kt7Dq2N8bJJ3zFlRDyc1OwR3iQ2cmHb48dGnBU9WejGMt8Z44FYwFfJFKz0g1lL00Qwa5gwxS5dStTdXGRrYUiWg8xS2jN+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776492999; c=relaxed/simple; bh=CQNapxLOS6PFADmEUnHs+eXVpPDfi0eLdJ7ithaYetg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fzrFV1XcBvpWslGy9xUwr8it1hqCxA9mk59M97zwqBEKM3m9REMrxiaUrTbXKqsOkRRb3YB3J+LtTNBfMNTvBua2Gi1RDqzjXjXnOKjRJVhfphaIwq1YD5gZpctbZR3zuNZymP6GxAz3zGddlXAXxvjKsCuLmCHDdKWhf1560qk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hackers.camp; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hackers.camp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43d7b879691so189567f8f.1 for ; Fri, 17 Apr 2026 23:16:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776492997; x=1777097797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cL9/O/PAg3wzAE4bDYDZOv/EHFkcw+FmE+GDn+dyams=; b=GPWN33VCvfiCA6wKe2unbZ2yOX7PSkkf4LqmPbcj+oUcYNfYSy+domGPAEIdJ01tKd C4VyVZ6c4fviwHaZEZ7fOIhfXIuUojal/f2wptjKztpVFMtKp21yD0IeY7/QRdFM5N98 JFk/Z9NHlVJbe/9HJNWWwnHFmEjT5TNd/5BcHzHSKuV8Dlt2l2i4OxtoQ9Iqt55A0i6q dJe5zqTorxxVBpIJrJv7+2tXCJXRqjIwlVx0tgFOixSFO1AGJ1cWAr+lBEq0lp1H+lZG XHwxr77D8+L+b5sxwyvY988RV80qvKQh4++PCYiu41orictJXKd4zoFsBRi1T7YvzPc3 cNIg== X-Forwarded-Encrypted: i=1; AFNElJ/eOFn11a17bekKasr1WgRSCprA0IIqAZGUbcqcA/n1ivfgquypbZJ4VbUhQbjIUaN466a/+jKAIrf5zPc=@vger.kernel.org X-Gm-Message-State: AOJu0Yym5NcFNspWzxh6OmoCO5fYYD+l0gxs0TMV/rztcZlnA7i1FIsy bBbh9nkM0smTvYhV1TYHx8rO53qBcrlRNvSPtGh9RnwWbRHf1jutThMD X-Gm-Gg: AeBDies9aCLIegdIshcEq34PgE6zBU4qzj5WpVZvOMSGZtc7Vb/2r6EERpECz6+TqjI paKxFCdpjePhzSHpR4uYK0OQS+x1QqXidq470Ql530VmTI1QweXe3I6Qi0qPd4DYmT3l5Luii4j 8D9WaH8jP3IFSYHqPico5gJjEgMg71P1EWiNQrTIokyIfiX8M9EFN/g0Zpw0nXPSceqx0HiW9ze KIJ9+l+SDzYWX3JumR6MXgbicZABje64eV6dIPxIiqf8KSxSmUmbaTYCcYzCpA1TpY8cP7IZfs+ +LljI0NGBzfwwvAubpC1QRzEN39syOb7zo/ZNWEV+9o3LWfmPpWZD8oEKHz6Hf8M//gbFDxM/gZ nE4O79Wo7JmnH3eAeJVpk68+ABW6pRfuZVfs9w+mN+U6ztBqBiRh9mloKhySR1vPAL5y7Hlrozm iILI2LMZzjZjua0bLTy34ixBd6qElPHaKRstPUYDOzEtap8Bwber5LAcRefB3UpTyb+3sjBioOH mk= X-Received: by 2002:a05:600c:5252:b0:487:575:5e3 with SMTP id 5b1f17b1804b1-488fb78bfe0mr47240145e9.5.1776492996461; Fri, 17 Apr 2026 23:16:36 -0700 (PDT) Received: from spartian-1.home ([2a01:cb1c:784:2f00:708:2805:7128:7a75]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fc1c96b4sm166248705e9.13.2026.04.17.23.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2026 23:16:36 -0700 (PDT) From: Aurelien DESBRIERES To: ebiggers@kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, willy@infradead.org, djwong@kernel.org, adilger@dilger.ca, pfalcato@suse.de, Aurelien DESBRIERES Subject: Re: [PATCH v2 08/11] ftrfs: add CRC32 checksumming and Reed-Solomon FEC skeleton Date: Sat, 18 Apr 2026 10:16:26 +0200 Message-ID: <20260418081625.2265166-2-aurelien@hackers.camp> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260414173423.GA24456@quark> References: <20260413230601.525400-1-aurelien@hackers.camp> <20260413230601.525400-9-aurelien@hackers.camp> <20260414173423.GA24456@quark> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit On Tue, Apr 14, 2026 at 10:34:23AM -0700, Eric Biggers wrote: > Is there a reason why the kernel's existing Reed-Solomon > encoding/decoding library isn't being used? No good reason. v2 had a custom GF(2^8) implementation - rolling our own RS arithmetic when lib/reed_solomon exists is not justifiable. v3 (<20260414120726.5713-1-aurelien@hackers.camp>) replaces the custom code entirely. The codec is initialized at module load via: init_rs(8, 0x187, 0, 1, 16) encode_rs8/decode_rs8 are used for all RS operations. The custom GF tables and encoder are gone. The v2 custom encoder was also incorrect - it did not produce codewords compatible with lib/reed_solomon. This would have caused silent corruption on RS-protected blocks written by mkfs and read by the kernel. Fixed in v3 and validated: mkfs parity matches lib/reed_solomon byte-for-byte on arm64 kernel 7.0. Aurelien DESBRIERES