HPE data corruption when running two times discard

facts

tests

disk with two parts

steps

fill part2 with hazard pattter

mkfs.xfs part1

read part1 data and compare with pattern

mkfs.xfs part1

read part1 and compare

data is wrong on some offset

related with fields

direct write

direct write with discard

buffered read

buffered read

page cache

part shares page cache with disk?

write bpftrace to observe it

device discard