I am playing around with ndctl inject-error and have a few questions around the
behavior of the application when an error occurs.
After successfully injecting error with --no-notify, I am able to read and
write to the namespace device with no problems. For e.g.:
# ndctl inject-error --block=35000 --count=10 --no-notify namespace2.0{
"dev":"namespace2.0",
"mode":"raw",
"size":17179869184,
"blockdev":"pmem2"
}
# dd if=/dev/pmem2 of=/tmp/pmem-dump bs=512 count=10 seek=35000 oflag=direct
10+0 records in
10+0 records out
5120 bytes (5.1 kB) copied, 0.0128088 s, 400 kB/s
# pwd
/sys/block/pmem2
# cat badblocks
# ----------> empty badblock list
[Question] Shouldn't my "dd" get a SIGBUS (default machine-check handling) when
it encounters badblocks that its not aware of (no-notify) ?
I tried to do both reading and writing to badblocks and things just work. If I
scrub my nvdimm's (ndctl start-scrub) and the badblocks show up in device
badblock list (/sys/block/pmem/badblocks) but dd can still work and writing the
blocks clears out the badblock list:
# cat /sys/block/pmem2/badblocks35000 10
# dd if=/dev/zero of=/dev/pmem2 bs=512 count=10 seek=35000 oflag=direct
10+0 records in
10+0 records out
- KK
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm