[Devel] [RFC PATCH vz9 v6 02/62] dm-ploop: Use READ_ONCE/WRITE_ONCE to access md page data
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Mon Dec 30 13:33:20 MSK 2024
On 30.12.24 12:28, Pavel Tikhomirov wrote:
>
>
> On 12/6/24 05:55, Alexander Atanasov wrote:
>> @@ -794,8 +794,8 @@ static void
>> ploop_advance_local_after_bat_wb(struct ploop *ploop,
>> }
>> if (success) {
>> - bat_entries[i] = dst_clu[i];
>> - md->bat_levels[i] = ploop_top_level(ploop);
>> + bat_entries[i] = READ_ONCE(dst_clu[i]);
>
> Should not it be WRITE_ONCE above?
Yes, it is fixed in dm-ploop: fix access to batpages to use WRITE_ONCE.
Patches are marked for merging.
>
>> + WRITE_ONCE(md->bat_levels[i], ploop_top_level(ploop));
>> } else {
>> ploop_hole_set_bit(i + off, ploop);
>> }
>
--
Regards,
Alexander Atanasov
More information about the Devel
mailing list