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 metadata purposes
and than interpret parsing result
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 SE
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 critical bug: do not (SEEK_HOLE | SEEK_DATA)
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
Signed-off-by: Andrey Zhadchenko
---
v3: remove
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-map.c | 2 +-
1 file changed, 1 insertion(+), 1
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
Signed-off-by: Andrey Zhadchenko
---
v2: fix
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-backup.c | 12
1 file changed, 12
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
1 file changed, 4 insertions(+), 4 de
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-by: Andrey Zhadchenko
---
v3: reworked the
The commit is pushed to "branch-rh7-3.10.0-1160.99.1.vz7.211.x-ovz" and will
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.99.1.vz7.211.1
-->
commit cc4f26d75e24dfe70f62795e9e0f46dd022751d3
Author: Alexander Atanasov
Date: Fri Sep 1 15:44:59 2023 +0300
cgr
The commit is pushed to "branch-rh7-3.10.0-1160.99.1.vz7.211.x-ovz" and will
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.99.1.vz7.211.1
-->
commit 8c4e10404a5959f22e588379e5440f07e3261b9c
Author: Alexander Atanasov
Date: Wed Aug 30 20:08:05 2023 +0300
pl
To test it need to boot with systemd.unified_cgroup_hierarchy=1 option.
https://jira.vzint.dev/browse/PSBM-149975
Signed-off-by: Pavel Tikhomirov
Pavel Tikhomirov (5):
cgroup: fix uninitiallized use of ctx->root
mm/memcontrol: fix available memory calculation in
mem_cgroup_enough_memory
This way systemd in container on cgroup-v2 can enable the controllers it
requires.
https://jira.vzint.dev/browse/PSBM-149975
Signed-off-by: Pavel Tikhomirov
---
kernel/cgroup/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgrou
In vfs_get_tree we explicitly check that fc->root is NULL before calling
->get_tree helper. So when mounting cgroup2 filesystem in the begining
of cgroup_get_tree the fc->root is uninitializled. We were lucky that
ve_hide_cgroups never dereferenced it on this code path, as mounting
cgroup2 from con
The change in is_virtualized_cgroot makes cgroup-v2 "virtualized" only
when it has enabled subsystems in it. And "virtualized" means that it
will be:
a) shown in different cgroup related proc files in container,
b) allowed to be mounted in container and
c) required to have separate root directory f
The idea of mem_cgroup_enough_memory check is to return ENOMEM on
allocations when container memory cgroup is close to OOM.
In vz7 we have:
free = memcg->memsw.limit - page_counter_read(&memcg->memsw);
In vz9:
free = memcg->memsw.max - page_counter_read(&memcg->memory);
The error here is mems
In cgroup-v2 memsw is not used anymore, instead we have swap and memory
separated from one another. So let's replace memsw to mem+swap.
https://jira.vzint.dev/browse/PSBM-149975
Signed-off-by: Pavel Tikhomirov
---
v2: should use mem+swap instead of just mem here
---
mm/memcontrol.c | 7 ++-
17 matches
Mail list logo