Re: [PATCH v5 1/9] lib: zstd: Add zstd compatibility wrapper

From: Chris Mason
Date: Tue Nov 10 2020 - 14:26:05 EST


On 10 Nov 2020, at 13:39, Christoph Hellwig wrote:

On Mon, Nov 09, 2020 at 02:01:41PM -0500, Chris Mason wrote:
You do consistently ask for a shim layer, but you haven???t explained what
we gain by diverging from the documented and tested API of the upstream zstd
project. It???s an important discussion given that we hope to regularly
update the kernel side as they make improvements in zstd.

An API that looks like every other kernel API, and doesn't cause endless
amount of churn because someone decided they need a new API flavor of
the day. Btw, I'm not asking for a shim layer - that was the compromise
we ended up with.

If zstd folks can't maintain a sane code base maybe we should just drop
this childish churning code base from the tree.

I think APIs change based on the needs of the project. We do this all the time in the kernel, and we don’t think twice about updating users of the API as needed. The zstd changes look awkward and large today because it’ a long time period, but we’ve all been pretty vocal in the past about the importance of being able to advance APIs.

-chris