Re: [f2fs-dev] [PATCH] f2fs: compress: fix zstd data corruption

2020-05-07 Thread Daeho Jeong
Great, thanks for checking~! :) 2020년 5월 8일 (금) 오후 3:42, Chao Yu 님이 작성: > > On 2020/5/8 11:30, Daeho Jeong wrote: > > I am a little bit confused. > > > > In compress_log=2 (4 pages), > > > > Every compression algorithm will set the cc->nr_cpages to 5 pages like > > below. > > > > max_len

Re: [f2fs-dev] [PATCH] f2fs: compress: fix zstd data corruption

2020-05-07 Thread Chao Yu
On 2020/5/8 11:30, Daeho Jeong wrote: > I am a little bit confused. > > In compress_log=2 (4 pages), > > Every compression algorithm will set the cc->nr_cpages to 5 pages like below. > >         max_len = COMPRESS_HEADER_SIZE + cc->clen; >         cc->nr_cpages = DIV_ROUND_UP(max_len, PAGE_SIZE)

Re: [f2fs-dev] [PATCH] f2fs: compress: fix zstd data corruption

2020-05-07 Thread Chao Yu
Hi Daeho, On 2020/5/8 9:28, Daeho Jeong wrote: > Hi Chao, > > IIUC, you are trying not to use ZSTD_compressBound() to save the memory > space. Am I right? > > Then, how about LZ4_compressBound() for LZ4 and lzo1x_worst_compress() for > LZO? Oops, it looks those limits were wrongly used... #def