[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 3/5] block/reqlist: allow adding overlapping requests
From: |
Michael Tokarev |
Subject: |
Re: [PULL 3/5] block/reqlist: allow adding overlapping requests |
Date: |
Tue, 1 Oct 2024 19:28:06 +0300 |
User-agent: |
Mozilla Thunderbird |
30.09.2024 11:43, Vladimir Sementsov-Ogievskiy wrote:
From: Fiona Ebner <f.ebner@proxmox.com>
Allow overlapping request by removing the assert that made it
impossible. There are only two callers:
1. block_copy_task_create()
It already asserts the very same condition before calling
reqlist_init_req().
2. cbw_snapshot_read_lock()
There is no need to have read requests be non-overlapping in
copy-before-write when used for snapshot-access. In fact, there was no
protection against two callers of cbw_snapshot_read_lock() calling
reqlist_init_req() with overlapping ranges and this could lead to an
assertion failure [1].
In particular, with the reproducer script below [0], two
cbw_co_snapshot_block_status() callers could race, with the second
calling reqlist_init_req() before the first one finishes and removes
its conflicting request.
Hm. This one applies to 7.2 too (current oldest stable series), with
the description above matching what the code is doing.
I picked it up for up to 7.2. Please let me know if this shouldn't be
done :)
Thanks,
/mjt
- Re: [PULL 3/5] block/reqlist: allow adding overlapping requests,
Michael Tokarev <=