Page MenuHomeFreeBSD

Add an option to gnop to allow rejecting I/O after allowing some through.
ClosedPublic

Authored by chs on Tue, Sep 10, 8:02 PM.

Details

Summary

Add a "count_until_fail" option to gnop, which says to start failing
I/O requests after the given number have been allowed though.

Test Plan

I've written a test that uses this feature to exercise FFS I/O error handling.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

chs created this revision.Tue, Sep 10, 8:02 PM
rpokala added inline comments.
lib/geom/nop/gnop.8
125 ↗(On Diff #61910)

I/O requests

kib accepted this revision.Wed, Sep 11, 5:21 AM
kib added inline comments.
sys/geom/nop/g_nop.c
198 ↗(On Diff #61910)

if (sc->sc_count_until_fail != 0 && ...

This revision is now accepted and ready to land.Wed, Sep 11, 5:21 AM
0mp requested changes to this revision.Wed, Sep 11, 11:10 AM
0mp added a subscriber: 0mp.
0mp added inline comments.
lib/geom/nop/gnop.8
27 ↗(On Diff #61910)

Remember to bump the date.

123 ↗(On Diff #61910)

.Bl -tag -width "-r count_until_fail" is enough here. Macros are not expanded here anyway (the whole .Fl r Ar count_until_fail string is treated literally).

This revision now requires changes to proceed.Wed, Sep 11, 11:10 AM
mckusick accepted this revision.Thu, Sep 12, 9:57 PM

With the minor changes requested, looks good to me.

imp accepted this revision.Thu, Sep 12, 10:20 PM

Modulo kib's quibble, this is ready to go. No need to repost the review if all you change is the .Dd date and kib's thing.

This revision was not accepted when it landed; it landed in state Needs Revision.Fri, Sep 13, 11:04 PM
This revision was automatically updated to reflect the committed changes.