Home | History | Annotate | Download | only in vndcompress

Lines Matching refs:blocksize

68 	uint32_t	blocksize;	/* bytes per block */
70 uint32_t n_full_blocks; /* floor(size/blocksize) */
71 uint32_t n_blocks; /* ceiling(size/blocksize) */
134 assert(MIN_BLOCKSIZE <= S->blocksize);
135 assert(S->blocksize <= MAX_BLOCKSIZE);
146 void *const uncompbuf = malloc(S->blocksize);
152 void *const compbuf = malloc(2 * (size_t)S->blocksize);
175 (S->size % S->blocksize) : S->blocksize);
177 assert(readsize <= S->blocksize);
193 S->blocksize, readsize, uncompbuf, compbuf);
309 assert(S->blocksize > 0);
311 const uint64_t nread = ((uint64_t)S->blkno * (uint64_t)S->blocksize);
330 assert(S->blocksize <= MAX_BLOCKSIZE);
336 ((uint64_t)S->n_checkpointed_blocks * (uint64_t)S->blocksize));
368 assert(S->blocksize <= MAX_BLOCKSIZE);
371 ((uint64_t)S->blkno * (uint64_t)S->blocksize));
415 S->blocksize = O->blocksize;
417 S->blocksize = (argc == 2? DEF_BLOCKSIZE :
422 /* Sanity-check the blocksize. (strsuftoll guarantees bounds.) */
424 if ((S->blocksize % DEV_BSIZE) != 0)
425 errx(1, "bad blocksize: %"PRIu32
427 S->blocksize, (uint32_t)DEV_BSIZE);
428 assert(MIN_BLOCKSIZE <= S->blocksize);
429 assert((S->blocksize % DEV_BSIZE) == 0);
430 assert(S->blocksize <= MAX_BLOCKSIZE);
474 assert(0 < S->blocksize);
475 if (TOOMANY(off_t, (off_t)S->size, (off_t)S->blocksize,
478 S->blocksize, S->size);
480 S->n_full_blocks = S->size/S->blocksize;
481 S->n_blocks = HOWMANY(S->size, S->blocksize);
597 if (be32toh(header.cl2h_blocksize) != S->blocksize) {
600 be32toh(header.cl2h_blocksize), S->blocksize);
648 if ((2 * (size_t)S->blocksize) <= (end - start)) {
709 assert(blkno <= (S->size / S->blocksize));
710 const off_t restart_position = ((off_t)blkno * (off_t)S->blocksize);
762 compress_block(int in_fd, int out_fd, uint32_t blkno, uint32_t blocksize,
766 assert(readsize <= blocksize);
767 assert(blocksize <= MAX_BLOCKSIZE);
782 (VNDCOMPRESS_COMPAT? blocksize : readsize); /* XXX */
877 header.cl2h_blocksize = htobe32(S->blocksize);