Re: [Devel] [PATCH VZ9] drivers/md/ploop: rework preallocation algorithm

2025-07-04 Thread Pavel Tikhomirov
Generally looks good, except maybe spliting "dropped unnused arguments" into separate patch as logically separate change and question about new condition in ploop_should_prealloc. Please see comments inline: On 7/2/25 22:43, Andrey Zhadchenko wrote: Recently we notices that fstrim does not w

Re: [Devel] [PATCH VZ9 v2 1/2] drivers/md/ploop: rework preallocation algorithm

2025-07-04 Thread Pavel Tikhomirov
Reviewed-by: Pavel Tikhomirov (for both patches) On 7/4/25 18:24, Andrey Zhadchenko wrote: Recently we noticed that fstrim does not work properly on ploop images. The problem is actually worse: current code preallocates excessive space on the image and loses it later. Example: [root@vz9-de

Re: [Devel] [PATCH VZ9] dm-ploop: fix error handling in ploop_resize

2025-07-04 Thread Andrey Zhadchenko
LGTM Reviewed-by: Andrey Zhadchenko On 7/4/25 09:36, Pavel Tikhomirov wrote: 1) Do not use goto when simple return is enough. 2) Propagate error code from ploop_prealloc_md_pages(). 3) Only cleanup what was acquired and make label names self-descriptive. 4) Fix unhandled ploop_suspend_submitti

[Devel] [PATCH VZ9 v2 1/2] drivers/md/ploop: rework preallocation algorithm

2025-07-04 Thread Andrey Zhadchenko
Recently we noticed that fstrim does not work properly on ploop images. The problem is actually worse: current code preallocates excessive space on the image and loses it later. Example: [root@vz9-demens-1 fstrim]# du -h . 4.0K . [root@vz9-demens-1 fstrim]# ploop init -s 10G image ... [

[Devel] [PATCH VZ9 v2 2/2] drivers/md/ploop: drop unused arguments

2025-07-04 Thread Andrey Zhadchenko
in ploop_should_prealloc() and ploop_truncate_prealloc_safe() https://virtuozzo.atlassian.net/browse/VSTOR-108868 Signed-off-by: Andrey Zhadchenko --- drivers/md/dm-ploop-map.c| 5 ++--- drivers/md/dm-ploop-target.c | 2 +- drivers/md/dm-ploop.h| 2 +- 3 files changed, 4 insertions(+

[Devel] [PATCH VZ9] dm-ploop: fix error handling in ploop_resize

2025-07-04 Thread Pavel Tikhomirov
1) Do not use goto when simple return is enough. 2) Propagate error code from ploop_prealloc_md_pages(). 3) Only cleanup what was acquired and make label names self-descriptive. 4) Fix unhandled ploop_suspend_submitting_pios errors. https://virtuozzo.atlassian.net/browse/VSTOR-108540 Signed-off-by