Hi Enzo,
I now have encryption, compression and encryption+compression all working :-)
I've pushed my patches here:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=cifs-experimental
It should work up to "cifs: Don't use corking".
Btw, is is_compressible() actually worth doing? It seems to copy a lot of
data (up to 4M) to an extra buffer and then do various analyses on it,
including doing a sort.
I need to extract a fix for collect_sample(), which I can do tomorrow, but it
should look something like:
/*
* Collect some 2K samples with 2K gaps between.
*/
static int collect_sample(const struct iov_iter *source, ssize_t max, u8 *sample)
{
struct iov_iter iter = *source;
size_t s = 0;
while (iov_iter_count(&iter) >= SZ_2K) {
size_t part = umin(umin(iov_iter_count(&iter), SZ_2K), max);
size_t n;
n = copy_from_iter(sample + s, part, &iter);
if (n != part)
return -EFAULT;
s += n;
max -= n;
if (iov_iter_count(&iter) < PAGE_SIZE - SZ_2K)
break;
iov_iter_advance(&iter, SZ_2K);
}
return s;
}
What's currently upstream won't work and may crash because it assumes that
ITER_XARRAY is in use - which should now never be true.
Also, there's a bug in wireshark's LZ77 decoder. See attached patch.