Lines Matching refs:strm

26 		struct z_erofs_lzma *strm;  in z_erofs_lzma_exit()  local
29 strm = z_erofs_lzma_head; in z_erofs_lzma_exit()
30 if (!strm) { in z_erofs_lzma_exit()
38 while (strm) { in z_erofs_lzma_exit()
39 struct z_erofs_lzma *n = strm->next; in z_erofs_lzma_exit()
41 if (strm->state) in z_erofs_lzma_exit()
42 xz_dec_microlzma_end(strm->state); in z_erofs_lzma_exit()
43 kfree(strm); in z_erofs_lzma_exit()
45 strm = n; in z_erofs_lzma_exit()
59 struct z_erofs_lzma *strm = kzalloc(sizeof(*strm), GFP_KERNEL); in z_erofs_lzma_init() local
61 if (!strm) { in z_erofs_lzma_init()
66 strm->next = z_erofs_lzma_head; in z_erofs_lzma_init()
67 z_erofs_lzma_head = strm; in z_erofs_lzma_init()
80 struct z_erofs_lzma *strm, *head = NULL; in z_erofs_load_lzma_config() local
115 strm = z_erofs_lzma_head; in z_erofs_load_lzma_config()
116 if (!strm) { in z_erofs_load_lzma_config()
125 for (last = strm; last->next; last = last->next) in z_erofs_load_lzma_config()
128 head = strm; in z_erofs_load_lzma_config()
133 for (strm = head; strm; strm = strm->next) { in z_erofs_load_lzma_config()
134 if (strm->state) in z_erofs_load_lzma_config()
135 xz_dec_microlzma_end(strm->state); in z_erofs_load_lzma_config()
136 strm->state = xz_dec_microlzma_alloc(XZ_PREALLOC, dict_size); in z_erofs_load_lzma_config()
137 if (!strm->state) in z_erofs_load_lzma_config()
161 struct z_erofs_lzma *strm; in z_erofs_lzma_decompress() local
179 strm = z_erofs_lzma_head; in z_erofs_lzma_decompress()
180 if (!strm) { in z_erofs_lzma_decompress()
185 z_erofs_lzma_head = strm->next; in z_erofs_lzma_decompress()
191 xz_dec_microlzma_reset(strm->state, inlen, outlen, in z_erofs_lzma_decompress()
194 strm->buf.in = kin + rq->pageofs_in; in z_erofs_lzma_decompress()
195 strm->buf.in_pos = 0; in z_erofs_lzma_decompress()
196 strm->buf.in_size = min_t(u32, inlen, PAGE_SIZE - rq->pageofs_in); in z_erofs_lzma_decompress()
197 inlen -= strm->buf.in_size; in z_erofs_lzma_decompress()
198 strm->buf.out = NULL; in z_erofs_lzma_decompress()
199 strm->buf.out_pos = 0; in z_erofs_lzma_decompress()
200 strm->buf.out_size = 0; in z_erofs_lzma_decompress()
205 if (strm->buf.out_pos == strm->buf.out_size) { in z_erofs_lzma_decompress()
206 if (strm->buf.out) { in z_erofs_lzma_decompress()
208 strm->buf.out = NULL; in z_erofs_lzma_decompress()
216 strm->buf.out_pos = 0; in z_erofs_lzma_decompress()
217 strm->buf.out_size = min_t(u32, outlen, in z_erofs_lzma_decompress()
219 outlen -= strm->buf.out_size; in z_erofs_lzma_decompress()
224 strm->buf.out = kmap(rq->out[no]) + pageofs; in z_erofs_lzma_decompress()
226 } else if (strm->buf.in_pos == strm->buf.in_size) { in z_erofs_lzma_decompress()
234 strm->buf.in_pos = 0; in z_erofs_lzma_decompress()
235 strm->buf.in_size = min_t(u32, inlen, PAGE_SIZE); in z_erofs_lzma_decompress()
236 inlen -= strm->buf.in_size; in z_erofs_lzma_decompress()
238 strm->buf.in = kin; in z_erofs_lzma_decompress()
249 memcpy(strm->bounce, strm->buf.in, strm->buf.in_size); in z_erofs_lzma_decompress()
250 strm->buf.in = strm->bounce; in z_erofs_lzma_decompress()
267 xz_err = xz_dec_microlzma_run(strm->state, &strm->buf); in z_erofs_lzma_decompress()
268 DBG_BUGON(strm->buf.out_pos > strm->buf.out_size); in z_erofs_lzma_decompress()
269 DBG_BUGON(strm->buf.in_pos > strm->buf.in_size); in z_erofs_lzma_decompress()
280 if (no < nrpages_out && strm->buf.out) in z_erofs_lzma_decompress()
286 strm->next = z_erofs_lzma_head; in z_erofs_lzma_decompress()
287 z_erofs_lzma_head = strm; in z_erofs_lzma_decompress()