Lines Matching refs:block

37  *                                       block.
39 * @compressed_block [in] The compressed block that was read from disk.
40 * @fragment_offset [out] The offset of the fragment within a compressed block.
47 struct compressed_block *block,
59 version = vdo_unpack_version_number(block->header.version);
67 compressed_size = __le16_to_cpu(block->header.sizes[slot]);
69 offset += __le16_to_cpu(block->header.sizes[i]);
135 * vdo_make_packer() - Make a new block packer.
189 * vdo_free_packer() - Free a block packer.
255 * @allocation: The allocation to which the compressed block was written.
271 * finish_compressed_write() - Finish a compressed block write.
306 "Completing compressed write vio for physical block %llu with error",
359 * initialize_compressed_block() - Initialize a compressed block.
360 * @block: The compressed block to initialize.
363 * This method initializes the compressed block in the compressed write agent. Because the
364 * compressor already put the agent's compressed fragment at the start of the compressed block's
368 static void initialize_compressed_block(struct compressed_block *block, u16 size)
371 * Make sure the block layout isn't accidentally changed by changing the length of the
372 * block header.
376 block->header.version = vdo_pack_version_number(COMPRESSED_BLOCK_1_0);
377 block->header.sizes[0] = __cpu_to_le16(size);
381 * pack_fragment() - Pack a data_vio's fragment into the compressed block in which it is already
385 * @offset: The offset into the compressed block at which to pack the fragment.
386 * @compressed_block: The compressed block which will be written out when batch is fully packed.
393 struct compressed_block *block)
396 char *fragment = to_pack->block->data;
401 block->header.sizes[slot] = __cpu_to_le16(to_pack->size);
402 memcpy(&block->data[offset], fragment, to_pack->size);
407 * compressed_write_end_io() - The bio_end_io for a compressed block write.
430 struct compressed_block *block;
440 block = compression->block;
441 initialize_compressed_block(block, compression->size);
445 offset = pack_fragment(compression, client, offset, slot++, block);
458 memset(&block->header.sizes[slot], 0,
468 result = vio_reset_bio(&agent->vio, (char *) block, compressed_write_end_io,
542 * block. But if the space currently used in the fullest bin is smaller than the compressed
543 * size of the incoming block, it seems wrong to force that bin to write when giving up on
560 * block.