I'm doing host restart testing where we power down the host after I/O is written and then verify the host data on power on. Nothing should be in-flight when the power down occurs.
Prior power loss I see sectors being written
(libzbc) /data/fake/fakesmr3: Write 784 sectors at sector 218352
However after a power cycle the zone is empty, resulting in I/O errors
(libzbc) /data/fake/fakesmr3: Read 784 sectors at sector 218352 (libzbc) [ERROR] /data/fake/fakesmr3: Read 784 sectors at sector 218352 failed 5 (Input/output error)
Using zbc_report_zones I can easily see there are zones we have written to but remain empty following power-cycle, including our zone with the target read
Zone 00100: type 0x2 (Sequential-write-required), cond 0xe (Full), reset recommended 0, non_seq 0, sector 204800, 2048 sectors, wp 206848 Zone 00101: type 0x2 (Sequential-write-required), cond 0xe (Full), reset recommended 0, non_seq 0, sector 206848, 2048 sectors, wp 208896 Zone 00102: type 0x2 (Sequential-write-required), cond 0xe (Full), reset recommended 0, non_seq 0, sector 208896, 2048 sectors, wp 210944 Zone 00103: type 0x2 (Sequential-write-required), cond 0xe (Full), reset recommended 0, non_seq 0, sector 210944, 2048 sectors, wp 212992 Zone 00104: type 0x2 (Sequential-write-required), cond 0xe (Full), reset recommended 0, non_seq 0, sector 212992, 2048 sectors, wp 215040 Zone 00105: type 0x2 (Sequential-write-required), cond 0x1 (Empty), reset recommended 0, non_seq 0, sector 215040, 2048 sectors, wp 215040 Zone 00106: type 0x2 (Sequential-write-required), cond 0x1 (Empty), reset recommended 0, non_seq 0, sector 217088, 2048 sectors, wp 217088 Zone 00107: type 0x2 (Sequential-write-required), cond 0x1 (Empty), reset recommended 0, non_seq 0, sector 219136, 2048 sectors, wp 219136 Zone 00108: type 0x2 (Sequential-write-required), cond 0x1 (Empty), reset recommended 0, non_seq 0, sector 221184, 2048 sectors, wp 221184
The question I have is does the fake driver support power-loss testing? It's almost like the metadata isn't synchronized with the process and data is loss. Does this seem like a sound understanding of the problem?