Hello,

On 8.10.24 18:42, Alexey Kuznetsov wrote:
[Some people who received this message don't often get email from 
alexey.n.kuznet...@gmail.com. Learn why this is important at 
https://aka.ms/LearnAboutSenderIdentification ]

Hello!

        if (is_data)
                 queue_work(ploop->wq, &ploop->worker);
-       if (is_flush)
+       else if (is_flush)
                 queue_work(ploop->wq, &ploop->fsync_worker);

IMHO this looks scary. bio with FLUSH must execute flush first,
and only after completion of flush data op in this bio is executed.
This used to be an absolute requirement since 2010. Lines
above look like they are desynchronized whch will defintely
lead to corruptions.

we have two unbound workequeues triggered here
- worker - which submits pios
- fsync_worker which executes the flush requests.

unbound means they run whenvever there is a free CPU.

if both are triggered simultaneously forget about any order of execution - both workers will race.

there is another change that runs the flush from the first worker
to try to keep the order as we see it.


--
Regards,
Alexander Atanasov

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to