summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorDongsheng Yang <dongsheng.yang@linux.dev>2025-12-05 05:46:18 +0000
committerMikulas Patocka <mpatocka@redhat.com>2025-12-10 19:28:23 +0100
commitebbb90344a7da2421e4b54668b94e81828b8b308 (patch)
tree0e416898b4c80f4a69eb40432d41042ed30223b1 /tools/lib/python/kdoc/parse_data_structs.py
parent7799eaecfeb756664be37c079520af67d5d64f70 (diff)
dm-pcache: advance slot index before writing slot
In dm-pcache, in order to ensure crash-consistency, a dual-copy scheme is used to alternately update metadata, and there is a slot index that records the current slot. However, in the write path the current implementation writes directly to the current slot indexed by slot index, and then advances the slot — which ends up overwriting the existing slot, violating the crash-consistency guarantee. This patch fixes that behavior, preventing metadata from being overwritten incorrectly. In addition, this patch add a missing pmem_wmb() after memcpy_flushcache(). Signed-off-by: Dongsheng Yang <dongsheng.yang@linux.dev> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reviewed-by: Zheng Gu <cengku@gmail.com> Cc: stable@vger.kernel.org # 6.18
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions