On 5.09.23 11:59, Andrey Zhadchenko wrote:
Add new function for block_device_operations, which will be used
for SEEK_HOLE and SEEK_DATA llseek calls
Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Signed-off-by: Andrey Zhadchenko
---
v2: fix
On 5.09.23 11:59, Andrey Zhadchenko wrote:
Add new function to target_type, so any dm devices may realize it
Implement intermediate llseek_hole() on device-mapper layer, do some simple
checks.
Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Si
On 5.09.23 11:59, Andrey Zhadchenko wrote:
push_backup dm module llseek_hole() should just call the same function
from it's origin bdev
Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Signed-off-by: Andrey Zhadchenko
---
drivers/md/dm-push-
On 5.09.23 11:59, Andrey Zhadchenko wrote:
Move code that calculates qio front bytes type and amount into a new
helper. Increase code clarity.
This will be used later for llseek_hole()
Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Signed-off
On 5.09.23 11:59, Andrey Zhadchenko wrote:
Implement llseek_hole() for dm-qcow2 target.
Iterate over ranges with cluster granularity until hole or data is found.
To reduce code duplication, we should use already existing parse_metadata()
We can pretend that seek request is read request for metada
On 5.09.23 11:59, Andrey Zhadchenko wrote:
Add braces around arguments so callers can use equations while
calling these macros.
Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Signed-off-by: Andrey Zhadchenko
---
drivers/md/dm-ploop.h | 8 +
On 5.09.23 11:59, Andrey Zhadchenko wrote:
When looking for SEEK_HOLE, we would like to check if cluster is locked
without valid pio
Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Signed-off-by: Andrey Zhadchenko
---
drivers/md/dm-ploop-ma
On 5.09.23 11:59, Andrey Zhadchenko wrote:
Implement find_hole() for dm-ploop target.
Iterate over clusters until we find hole or data by using
ploop_bat_entries() which will do all our work
Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Sign