Page MenuHomeFreeBSD

Use buf to send speedup
ClosedPublic

Authored by imp on Jan 9 2020, 11:10 PM.
Tags
None
Referenced Files
F163404832: D23117.id66582.diff
Wed, Jul 22, 10:13 PM
F163401124: D23117.id.diff
Wed, Jul 22, 9:24 PM
Unknown Object (File)
Tue, Jul 21, 11:24 AM
Unknown Object (File)
Sat, Jul 18, 8:04 AM
Unknown Object (File)
Sun, Jul 12, 6:41 AM
Unknown Object (File)
Mon, Jul 6, 1:30 AM
Unknown Object (File)
Jun 21 2026, 6:57 PM
Unknown Object (File)
Jun 20 2026, 6:33 PM
Subscribers
None

Details

Summary

It turns out there's a problem with using g_io to send the speedup. It leads to
a race when there's a resource shortage when a disk fails.

Instead, send BIO_SPEEDUP via struct buf. This is pretty straight forward,
except we need to transfer the bio_flags from b_ioflags for BIO_SPEEDUP commands
in g_vfs_strategy.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28584
Build 26626: arc lint + arc unit

Event Timeline

I have never been a fan of short-circuiting the layers, so am fine with keeping them intact.

This revision is now accepted and ready to land.Jan 13 2020, 4:47 AM

minor nit: the returned "resid" value is unused. otherwise looks good.

In D23117#508978, @chs wrote:

minor nit: the returned "resid" value is unused. otherwise looks good.

I go back and forth on this. I'd like the interface to return how much of the shortage it could handle, but neither place I use it now does....
I'll take it out for now.

This revision was automatically updated to reflect the committed changes.