Page MenuHomeFreeBSD

nvme: Add namespace mgmt and attachment support.
ClosedPublic

Authored by mffbsdw_gmail.com on Jun 28 2017, 8:01 PM.

Details

Summary

Add nscreate/nsdelete and nsattach/nsdetach to nvmecontrol
and support in nvme driver for same.

Test Plan

Tested nscreate/nsattach partition, mount, write/read and
nsdetach/nsdelete on HGST 4500 and Samsung PM963 nvme drives supporting
namespace and attachement command sets. Ensure existing nvme drives not
supporting namespace (Intel 750) continue to work as expected.

Diff Detail

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

Event Timeline

First round of suggestions. I haven't had a chance to delve deeply into these changes, so this is just what jumped out.

sbin/nvmecontrol/identify.c
69 ↗(On Diff #30189)

I've pushed this upstream.

sys/dev/nvme/nvme_ctrlr.c
1006–1017 ↗(On Diff #30189)

Rather than a special case in sniffing the passthrough commands, why not register async namespace notifications and use those instead and get rid of all this special case code.

sys/dev/nvme/nvme_sim.c
185 ↗(On Diff #30189)

Why wasn't it causing problems before? I don't understand.

262 ↗(On Diff #30189)

I've upstreamed something better here.

266 ↗(On Diff #30189)

This change is gratuitous.

278 ↗(On Diff #30189)

This change is gratuitous.

280 ↗(On Diff #30189)

Is this where what causes the uninitialized namespace issue?

This revision was not accepted when it landed; it landed in state Needs Review.May 5 2018, 8:08 PM
This revision was automatically updated to reflect the committed changes.