[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190605143219.248ca514546f69946aa2e07e@linux-foundation.org>
Date: Wed, 5 Jun 2019 14:32:19 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: dsterba@...e.cz
Cc: Maninder Singh <maninder1.s@...sung.com>,
herbert@...dor.apana.org.au, davem@...emloft.net,
keescook@...omium.org, gustavo@...eddedor.com, joe@...ches.com,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
a.sahrawat@...sung.com, pankaj.m@...sung.com, v.narang@...sung.com,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
terrelln@...com
Subject: Re: [PATCH 1/4] zstd: pass pointer rathen than structure to
functions
On Wed, 5 Jun 2019 14:32:53 +0200 David Sterba <dsterba@...e.cz> wrote:
> > >
> > > -static ZSTD_parameters zstd_get_btrfs_parameters(unsigned int level,
> > > +static ZSTD_parameters *zstd_get_btrfs_parameters(unsigned int level,
> > > size_t src_len)
> > > {
> > > - ZSTD_parameters params = ZSTD_getParams(level, src_len, 0);
> > > + static ZSTD_parameters params;
> >
> > > +
> > > + params = ZSTD_getParams(level, src_len, 0);
> >
> > No thats' broken, the params can't be static as it depends on level and
> > src_len. What happens if there are several requests in parallel with
> > eg. different levels?
I wondered. I'll drop the patch series as some more serious thinking
is needed.
> > Would be really great if the mailinglist is CCed when the code is
> > changed in a non-trivial way.
Well we didn't actually change btrfs until I discovered that Maninder
had missed it.
> So this does not compile fs/btrfs/zstd.o which Andrew probably found
> too, otherwise btrfs is the only in-tree user of the function outside of
> lib/ and crypto/.
Worked for me - I might have sent the wrong version.
> I think that Nick Terrell should have been CCed too, as he ported zstd
> to linux.
Powered by blists - more mailing lists