/* The header of a compressed block. */ struct compressed_block_header { /* Unsigned 32-bit major and minor versions, little-endian */ struct packed_version_number version;
/* List of unsigned 16-bit compressed block sizes, little-endian */
__le16 sizes[VDO_MAX_COMPRESSION_SLOTS];
} __packed;
/* *Eachpacker_binholdsanincompletebatchofdata_viosthatonlypartiallyfillacompressed *block.Thebinsarekeptinalistsortedbytheamountofunusedspacesothefirstbinwith *enoughspacetoholdanewly-compresseddata_viocaneasilybefound.Whenthebinfillsupor *isflushed,thefirstuncanceleddata_viointhebinisselectedtobetheagentforthatbin. *Uponenteringthepacker,eachdata_vioalreadyhasitscompresseddatainthefirstslotofthe *data_vio'scompressed_block(overlaidonthedata_vio'sscratch_block).Sotheagent'sfragment *isalreadyinplace.Thefragmentsfortheotheruncanceleddata_viosinthebinarepackedinto *theagent'scompressedblock.Theagentthenwritesoutthecompressedblock.Ifthewriteis *successful,theagentsharesitspbnlockwhicheachoftheotherdata_viosinitscompressed *blockandsendseachonitsway.Finallytheagentitselfcontinuesonthewritepathasbefore. * *Thereisonespecialbinwhichisusedtoholddata_vioswhichhavebeencanceledandremoved *fromtheirbinbythepacker.Thesedata_viosneedtowaitforthecancellertorendezvouswith *themandsotheysitinthisspecialbin.
*/ struct packer_bin { /* List links for packer.packer_bins */ struct list_head list; /* The number of items in the bin */
slot_number_t slots_used; /* The number of compressed block bytes remaining in the current batch */
size_t free_space; /* The current partial batch of data_vios, waiting for more */ struct data_vio *incoming[];
};
struct packer { /* The ID of the packer's callback thread */
thread_id_t thread_id; /* The number of bins */
block_count_t size; /* A list of all packer_bins, kept sorted by free_space */ struct list_head bins; /* *Abintoholddata_vioswhichwerecanceledoutofthepackerandarewaitingto *rendezvouswiththecancelingdata_vio.
*/ struct packer_bin *canceled_bin;
/* The current flush generation */
sequence_number_t flush_generation;
/* The administrative state of the packer */ struct admin_state state;
/* Statistics are only updated on the packer thread, but are accessed from other threads */ struct packer_statistics statistics;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.