[Devel] [RFC PATCH vz9 v6 02/62] dm-ploop: Use READ_ONCE/WRITE_ONCE to access md page data

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Mon Dec 30 13:28:15 MSK 2024



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?

> +			WRITE_ONCE(md->bat_levels[i], ploop_top_level(ploop));
>   		} else {
>   			ploop_hole_set_bit(i + off, ploop);
>   		}

-- 
Best regards, Tikhomirov Pavel
Senior Software Developer, Virtuozzo.



More information about the Devel mailing list