[Devel] [PATCH hci-8.2 2/3] dm/push_backup: free the bitmaps of an expired session on restart
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Nov 25 14:47:50 MSK 2026
I won't apply this version, please send v2 with the changes below.
- The old bitmaps are never freed, not "lost until the target is
destroyed": item 5 of the cover letter reply.
- Drop the 32 GiB example.
- Narrow the last sentence: a failed start still changes the timeout.
On Wed, 25 Nov 2026 11:29:52 +0000, Vasileios Almpanis wrote:
> bitmaps are lost until the target is destroyed, because only
> push_backup_stop() and pb_destroy() free them, and they see only the
> current pointers.
pb_destroy() frees only the current pointers, so the old bitmaps are
never freed; the sentence contradicts itself.
> Each bitmap takes one bit per cluster. For example, on a 32 GiB device
> with a cluster size of 1 sector each bitmap is 8 MiB, so every restart
The first sentence already says what the leak scales with; ploop sets
up the target with the image's cluster size, so the 1-sector example
overstates it.
> dropped. If setting up the new session fails, the expired session
> keeps its bitmaps and its expired state.
setup_pb() writes timeout_in_jiffies and deadline_jiffies before the
allocations, so after a failed start the status shows the expired
session with the timeout of the failed one. Either move the two stores
under pb->lock with the swap, or say "keeps its bitmaps".
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list