Re: git: 2612f1b8649b - main - deadfs: Return ENXIO instead of EIO when the device is gone.

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Fri, 24 Oct 2025 14:50:03 UTC
I updated the "ThinkCenter" to 15-BETA2-p1 and made some experiments
and I get different results now than before.

This is obviously without the fix.


Now I see 25 read(2)'s return EIO before ENXIO arrives.

Each of those 25 read(2)'s do:

	read(2) syscall
	all the way down to CAM
	for 4(?) retries:
		CAM sends CCB down
		CAM gets CCB back with error
		CAM printf's two lines to console
	CAM returns EIO
	userland gets EIO
	userland printf's to stdout (=console)

And only then does ENXIO finally appear.

This is single-user mode with a random old USB stick.

i915kms does not seem to affect the result in this experiment.

I'm buildLLVM'ing on my laptop, will perform more experiments
on that platform once that is complete

Poul-Henning

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.