[Devel] [PATCH hci-8.1 v3 3/8] dm-qcow2: count fast path writes in parse_metadata()
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Nov 13 22:48:27 MSK 2026
No objections to the code, a text change below: I fix it when
applying or you send v4, see the cover letter reply.
On Fri, 13 Nov 2026 14:11:21 +0300, Andrey Zhadchenko wrote:
> md_pages_lock hold, which checks the L2 entry. A discard switches the
> writer generation after it clears the entry under the lock, so
> either the fast path sees the entry cleared, or the discard waits for
> the write. Drop the count, if the qio goes to main kwork afterwards.
Item 2 of the cover letter reply: "sees the entry cleared" becomes
"sees the index locked".
Why: prepare_cluster_discard() locks the index under md_pages_lock,
and from then on parse_l2() parks the fast qio in delay_if_locked().
The entry itself is cleared only later, in process_indexes_write().
The mechanism is right, the sentence names the wrong guard.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list