Reading this "softdep" thread (that is https://marc.info/?l=openbsd-misc&m=142164001816142 ) was quite intriguing.

Two followup questions:

1. Re EIO: I understand a disk write in softdep will compromise/crash the filesystem. But the error reported below was that it crashes the *OS*.

It seems to me that crashing the whole OS is a too harsh response to disk write failure.

Is this "crash vector" in the code today too?


2. Re "softdep getting too far behind" i.e. dependency chain too large: Is the "dependency chain" the write queue - if so, can't the softdep code simply block until more data has been flushed to disk?

Is "too large" here when all resident RAM has been consumed?

Is this "crash vector" in the code today too?



On 2015-01-29 05:03, Ted Unangst Wrote:
On Fri, Jan 23, 2015 at 21:47, Steve Shockley wrote:
..
> I found my old notes, it turns out it was on 4.6 and the crash message was:
>
> softdep_setup_freeblocks: got error 5 while accessing filesystem
> dev = 0x404, block = 1315, fs = /var
> panic: ffs_blkfree: freeing free frag
> Stopped at      Debugger+0x4:   leave

error 5 is EIO, input/output error. softdep does not support disks
that don't work, to put it bluntly. The original FFS code can cope
with disk failure by backing out of the operation, but soft updates
reorders things and can't undo what's already been done.


On 2015-02-03 05:30, Ted Unangst wrote:
Clint Pachl wrote:
>
> So softdep can definitely enhance performance. And according to Kirk
> McKusick, it also enhances FS consistency. So I think I'll be enabling
> softdep on my production servers.
>
> I'm sure all the bugs in that "complex" softdep code have been worked
> out by now. ;-)

softdep will occasionally bite it in two circumstances:
1. IO error. (not really an occasionally; if there's an error, you're dead.) 2. softdep gets too far behind. think untarring 20 copies of ports.tgz and running rm -rf in parallel. if you slow disks, the dependency chain grows and grows. over the years, lots of fixes have been made, but this is where the trouble lies. ironically, fast disks like SSD are least likely to fall
behind. softdep is probably safest on SSD.

Reply via email to