Require that compression saves at least one pblk
This commit is contained in:
parent
f8361d1e2e
commit
0d3d79de10
|
@ -105,7 +105,7 @@ lblk_compress(struct lbd* lbd)
|
|||
void *dbuf = lbd->buf;
|
||||
u32 dlen = PBLK_SIZE * lblk_per_pblk(lbd->params);
|
||||
void *cbuf = lbd->lz4_cbuf;
|
||||
u32 clen = PBLK_SIZE * lblk_per_pblk(lbd->params) - 1;
|
||||
u32 clen = PBLK_SIZE * (lblk_per_pblk(lbd->params) - 1);
|
||||
|
||||
ret = LZ4_compress_default(dbuf, cbuf, dlen, clen, lbd->lz4_wrkmem);
|
||||
if (ret <= 0) {
|
||||
|
|
Loading…
Reference in New Issue