[Devel] [PATCH RH9 v2 0/8] allow to seek holes in block devices

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Wed Aug 16 12:32:47 MSK 2023


We need to be able to know if and where the image is sparse during
backups.
Implement blockdev and dm infrastructure, add an ability to find
holes for dm-qcow2, dm-ploop, dm-push-backup
After this patches llseek with SEEK_HOLES and SEEK_DATA can be used
with block devices

Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop

v2:
 - s/find_hole/llseek_hole/
 - add new patch with calc_front_qio_bytes() helper
 - rework dm-qcow2 llseek_hole function

Andrey Zhadchenko (8):
  block/fops: add llseek_hole to blockdevops
  dm: add llseek_hole infrastructure
  dm/push_backup: add llseek_hole proxy
  dm/dm-qcow2: add calc_front_qio_bytes() helper
  dm/dm-qcow2: add llseek_hole
  dm/dm-ploop: reinforce some defines
  dm/dm-ploop: allow to check if cluster is locked
  dm/dm-ploop: add llseek_hole

 block/fops.c                  |  13 ++
 drivers/md/dm-ploop-map.c     |  52 +++++-
 drivers/md/dm-ploop-target.c  |   1 +
 drivers/md/dm-ploop.h         |   9 +-
 drivers/md/dm-push-backup.c   |  12 ++
 drivers/md/dm-qcow2-map.c     | 303 ++++++++++++++++++++++++++++++++--
 drivers/md/dm-qcow2-target.c  |   1 +
 drivers/md/dm-qcow2.h         |   2 +
 drivers/md/dm.c               |  41 +++++
 include/linux/blkdev.h        |   1 +
 include/linux/device-mapper.h |   4 +
 11 files changed, 421 insertions(+), 18 deletions(-)

-- 
2.39.3



More information about the Devel mailing list