Require that compression saves at least one pblk

This commit is contained in:
Tom Marshall 2019-10-30 10:03:50 -07:00
parent f8361d1e2e
commit 0d3d79de10
1 changed files with 1 additions and 1 deletions

View File

@ -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) {