Lines Matching refs:block

27 #include "block-map.h"
82 * for which a data_vio or discard permit are not available will block until the necessary
398 /* This data_vio is already set up to not block in the packer. */
413 * attempt_logical_block_lock() - Attempt to acquire the lock on a logical block.
446 result = VDO_ASSERT(lock_holder->logical.locked, "logical block lock held");
482 * launch_data_vio() - (Re)initialize a data_vio to have a new logical block number, keeping the
510 static bool is_zero_block(char *block)
515 if (*((u64 *) &block[i]))
541 memset(&data_vio->compression, 0, offsetof(struct compression_state, block));
550 * block.
797 result = vdo_allocate_memory(VDO_BLOCK_SIZE, 0, "compressed block",
798 &data_vio->compression.block);
801 "data_vio compressed block allocation failure");
829 vdo_free(vdo_forget(data_vio->compression.block));
957 * This will block if data_vios or discard permits are not available.
1153 * release_allocated_lock() - Release the PBN lock and/or the reference on the allocated block at
1176 "no logical block lock held for block %llu",
1184 "logical block lock mismatch for block %llu",
1213 "logical block lock mismatch for block %llu",
1219 * transferred. We must ensure that the new lock holder doesn't block in the packer.
1233 * release_logical_lock() - Release the logical block lock and flush generation lock at the end of
1270 * If it is part of a multi-block discard, starts on the next block, otherwise, returns it to the
1393 * data_vio_allocate_data_block() - Allocate a data block.
1395 * @write_lock_type: The type of write lock to obtain on the block.
1417 * release_data_vio_allocation_lock() - Release the PBN lock on a data_vio's allocated block.
1420 * If the reference to the locked block is still provisional, it will be released as well.
1446 struct compressed_block *block = data_vio->compression.block;
1447 int result = vdo_get_compressed_block_fragment(mapping_state, block,
1455 size = LZ4_decompress_safe((block->data + fragment_offset), buffer,
1557 * read_block() - Read a block asynchronously.
1575 result = vio_reset_bio(vio, (char *) data_vio->compression.block,
1615 * to updating the block map.
1669 * block. Downgrade the allocation lock to a read lock so it can be used later by
1715 * Gets the previous PBN mapped to this LBN from the block map, so as to make an appropriate
1742 * pack_compressed_data() - Attempt to pack the compressed data_vio into a block.
1775 * By putting the compressed data at the start of the compressed block data field, we won't
1779 data_vio->compression.block->data, VDO_BLOCK_SIZE,
1798 VDO_ASSERT_LOG_ONLY(!data_vio->is_duplicate, "compressing a non-duplicate block");
1808 * 1) Since data_vios can block indefinitely in the packer, it would be bad to do so if the
1862 * step is to hash the block data.
1883 /** write_data_vio() - Write a data block to storage without compression. */
1891 * There was no space to write this block and we failed to deduplicate or compress
1908 /* Write the data from the data block buffer. */
1947 * allocate_block() - Attempt to allocate a block in the current allocation zone.
1978 * handle_allocation_error() - Handle an error attempting to allocate a block.
2001 "data_vio with no block map page is a discard");
2007 * continue_data_vio_with_block_map_slot() - Read the data_vio's mapping from the block map.
2027 * This is a discard for a block on a block map page which has not been allocated, so
2036 * We need an allocation if this is neither a full-block discard nor a
2037 * full-block zero write.
2047 * We don't need to write any data, so skip allocation and just update the block map and
2055 /* This is not the final block of a discard so we can't acknowledge it yet. */