Page MenuHomeFreeBSD

nvmecontrol devlist: Annotate disconnected fabrics controllers
Needs ReviewPublic

Authored by jhb on Fri, Dec 27, 8:29 PM.

Details

Reviewers
imp
chuck
Summary

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 61359
Build 58243: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Fri, Dec 27, 8:29 PM
sbin/nvmecontrol/devlist.c
133

Why _FAST? It's called once.

Also, you could base this on the tv_sec field being != 0. That can Never happen for CLOCK_REALTIME.

sbin/nvmecontrol/devlist.c
133

Just that there's no reason for any real precision here given we only care about seconds granularity. I was assuming that we should use _FAST by default unless more precision is required?

sbin/nvmecontrol/devlist.c
133

In a loop, definitely optimize for fast. For a one-off call, optimizing for fast is harder to read, imho, so I use the standard form. It saves hitting the hardware once to get the latest TC, which is super cheap on modern time counters, and not that expensive on the exotics.

But where does last_disconnect get populated from? The kernel sets it, I know, but how/where is that set?