Hi, 在 2025/06/30 10:07, Xiao Ni 写道:
Can this for loop run? If one bit is dirty, it must set pctl->dirty. So the second write comes, it finds pctl->dirty is set and llbitmap_infect_dirty_bits function run and return. So it looks like it will not run the for loop.
I don't quite understand what you mean ... There are two cases: 1) write two bits int the same block twice, then test_and_set_bit() will pass; 2) write one bit, set block dirty, after bitmap unplug and before cleaning the bit, then test_and_set_bit() will fail, and the loop will run. Thanks, Kuai