On Wed, Apr 29, 2020 at 02:00:39AM +0000, keens keens wrote: > I want to compress all the data or files when the apps in VMs writes to a > pass-through block device via kvm virtio. > And decompress the data when the apps in VMs trying to read the data from the > pass-through block device on host. > > My idea is to add a data transform layer into virtio architecture for the > purpose of transparent compress. > I am reading the virtio.c, virtio_ring.c code, but have not found the place > where I can do the data compress. > Is it feasible that we can add a filter into the virtio, and there is a > chance to do data compress or encrypt in the filter?
Can you use existing volume-level compression features instead of reimplementing compression in virtio-specific code? For example, the VDO device-mapper target is available for Linux: https://github.com/dm-vdo/kvdo https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deduplicating_and_compressing_storage/deploying-vdo_deduplicating-and-compressing-storage If not, can you explain your use case in more detail? Thanks, Stefan
signature.asc
Description: PGP signature
