Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
dm-qcow2: Introduce driver to create block devices over QCOW2 files
Driver for attaching QCOW2 files as block devices. It cares about performance-critical actions like actual IO and snapshot COW and merge, while complex and fast metadata-related service actions (e.g., snapshot creation and resize) are delegated to userspace. Suspend/resume is a barrier between the driver and userspace. On suspend the driver brings QCOW2 images in consistent state, while on resume it re-reads metadata from QCOW2 images. Userspace proceeds metadata-related service actions while device is suspended, and it never does this on running device. This demarcation allows driver code to be pretty small. Implemented full support for QCOW2 format: compressed clusters, internal snapshots, backing files and extended L2 table. Current limitations: the lowest backing file must be QCOW2 (RAW backing files are not supported), cluster and subcluster sizes for all backing files in chain must be equal (I'm going to change this in the future). Also, implemented backward merge (from top image to its backing file). The driver is request based, since this allows to use blk-mq merging of request. Driver splits requests itself, and every request (i.e., qio) after splitting fits a single cluster. (In some cases it is worth to create bigger splits, and this is a subject of further optimizations). Signed-off-by: Kirill Tkhai <kirill.tkhai@openvz.org>
- Loading branch information