Documentation ¶
Overview ¶
(C) Copyright 2019-2020 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
(C) Copyright 2019-2020 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
(C) Copyright 2019 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
(C) Copyright 2019 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
(C) Copyright 2019 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
(C) Copyright 2019-2020 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are subject to the terms of the Apache License as provided in Contract No. 8F-30005. Any reproduction of computer software, computer software documentation, or portions thereof marked with this legend must also reproduce the markings.
Index ¶
- Variables
- func FaultFormatBadPciAddr(pciAddr string) *fault.Fault
- func FaultFormatError(err error) *fault.Fault
- func FaultFormatUnknownClass(class string) *fault.Fault
- type Backend
- type ClassProvider
- type DeviceFormatResponse
- type DeviceFormatResponses
- type FormatRequest
- type FormatResponse
- type Forwarder
- type InitRequest
- type InitResponse
- type MockBackend
- type MockBackendConfig
- type PrepareRequest
- type PrepareResponse
- type Provider
- func (p *Provider) Format(req FormatRequest) (*FormatResponse, error)
- func (p *Provider) Init(req InitRequest) error
- func (p *Provider) Prepare(req PrepareRequest) (*PrepareResponse, error)
- func (p *Provider) Scan(req ScanRequest) (*ScanResponse, error)
- func (p *Provider) WithForwardingDisabled() *Provider
- type ScanRequest
- type ScanResponse
Constants ¶
This section is empty.
Variables ¶
var (
FaultUnknown = bdevFault(code.BdevUnknown, "unknown bdev error", "")
)
Functions ¶
func FaultFormatBadPciAddr ¶ added in v0.9.0
func FaultFormatError ¶ added in v0.9.0
func FaultFormatUnknownClass ¶ added in v0.8.0
Types ¶
type Backend ¶ added in v0.8.0
type Backend interface { Init(shmID ...int) error Reset() error Prepare(hugePageCount int, targetUser string, pciWhitelist string) error Scan() (storage.NvmeControllers, error) Format(pciAddr string) (*storage.NvmeController, error) }
Backend defines a set of methods to be implemented by a Block Device backend.
type ClassProvider ¶
type ClassProvider struct {
// contains filtered or unexported fields
}
ClassProvider implements functionality for a given bdev class
func NewClassProvider ¶
func NewClassProvider(log logging.Logger, cfgDir string, cfg *storage.BdevConfig) (*ClassProvider, error)
func (*ClassProvider) GenConfigFile ¶
func (p *ClassProvider) GenConfigFile() (err error)
func (*ClassProvider) PrepareDevices ¶
func (p *ClassProvider) PrepareDevices() error
type DeviceFormatResponse ¶ added in v0.8.0
type DeviceFormatResponse struct { Formatted bool Error *fault.Fault Controller *storage.NvmeController }
DeviceFormatResponse contains device-specific Format operation results.
type DeviceFormatResponses ¶ added in v0.8.0
type DeviceFormatResponses map[string]*DeviceFormatResponse
DeviceFormatResponses is a map of device identifiers to device Format results.
type FormatRequest ¶ added in v0.8.0
type FormatRequest struct { pbin.ForwardableRequest Class storage.BdevClass DeviceList []string }
FormatRequest defines the parameters for a Format operation.
type FormatResponse ¶ added in v0.8.0
type FormatResponse struct {
DeviceResponses DeviceFormatResponses
}
FormatResults contains the results of a Format operation.
type Forwarder ¶ added in v0.9.0
func NewForwarder ¶ added in v0.9.0
func (*Forwarder) Format ¶ added in v0.9.0
func (f *Forwarder) Format(req FormatRequest) (*FormatResponse, error)
func (*Forwarder) Init ¶ added in v0.9.0
func (f *Forwarder) Init(req InitRequest) error
func (*Forwarder) Prepare ¶ added in v0.9.0
func (f *Forwarder) Prepare(req PrepareRequest) (*PrepareResponse, error)
func (*Forwarder) Scan ¶ added in v0.9.0
func (f *Forwarder) Scan(req ScanRequest) (*ScanResponse, error)
type InitRequest ¶ added in v0.8.0
type InitRequest struct { pbin.ForwardableRequest SPDKShmID int }
InitRequest defines the parameters for initializing the provider.
type InitResponse ¶ added in v0.9.0
type InitResponse struct{}
InitResponse contains the results of a successful Init operation.
type MockBackend ¶ added in v0.8.0
type MockBackend struct {
// contains filtered or unexported fields
}
func DefaultMockBackend ¶ added in v0.8.0
func DefaultMockBackend() *MockBackend
func NewMockBackend ¶ added in v0.8.0
func NewMockBackend(cfg *MockBackendConfig) *MockBackend
func (*MockBackend) Format ¶ added in v0.8.0
func (mb *MockBackend) Format(pciAddr string) (*storage.NvmeController, error)
func (*MockBackend) Init ¶ added in v0.8.0
func (mb *MockBackend) Init(_ ...int) error
func (*MockBackend) Prepare ¶ added in v0.8.0
func (mb *MockBackend) Prepare(_ int, _, _ string) error
func (*MockBackend) Reset ¶ added in v0.8.0
func (mb *MockBackend) Reset() error
func (*MockBackend) Scan ¶ added in v0.8.0
func (mb *MockBackend) Scan() (storage.NvmeControllers, error)
type MockBackendConfig ¶ added in v0.8.0
type MockBackendConfig struct { InitErr error ResetErr error PrepareErr error FormatRes *storage.NvmeController FormatFailIdx int FormatErr error ScanRes storage.NvmeControllers ScanErr error // contains filtered or unexported fields }
type PrepareRequest ¶ added in v0.8.0
type PrepareRequest struct { pbin.ForwardableRequest HugePageCount int PCIWhitelist string TargetUser string ResetOnly bool }
PrepareRequest defines the parameters for a Prepare operation.
type PrepareResponse ¶ added in v0.8.0
type PrepareResponse struct{}
PrepareResponse contains the results of a successful Prepare operation.
type Provider ¶ added in v0.8.0
type Provider struct {
// contains filtered or unexported fields
}
Provider encapsulates configuration and logic for interacting with a Block Device Backend.
func DefaultMockProvider ¶ added in v0.8.0
func DefaultProvider ¶ added in v0.8.0
DefaultProvider returns an initialized *Provider suitable for use in production code.
func NewMockProvider ¶ added in v0.8.0
func NewMockProvider(log logging.Logger, mbc *MockBackendConfig) *Provider
func NewProvider ¶ added in v0.8.0
NewProvider returns an initialized *Provider.
func (*Provider) Format ¶ added in v0.8.0
func (p *Provider) Format(req FormatRequest) (*FormatResponse, error)
Format attempts to initialize NVMe devices for use by DAOS (NB: no-op for non-NVMe devices).
func (*Provider) Init ¶ added in v0.8.0
func (p *Provider) Init(req InitRequest) error
Init performs any initialization steps required by the provider.
func (*Provider) Prepare ¶ added in v0.8.0
func (p *Provider) Prepare(req PrepareRequest) (*PrepareResponse, error)
Prepare attempts to perform all actions necessary to make NVMe components available for use by DAOS.
func (*Provider) Scan ¶ added in v0.8.0
func (p *Provider) Scan(req ScanRequest) (*ScanResponse, error)
Scan attempts to perform a scan to discover NVMe components in the system.
func (*Provider) WithForwardingDisabled ¶ added in v0.9.0
type ScanRequest ¶ added in v0.8.0
type ScanRequest struct {
pbin.ForwardableRequest
}
ScanRequest defines the parameters for a Scan operation.
type ScanResponse ¶ added in v0.8.0
type ScanResponse struct {
Controllers storage.NvmeControllers
}
ScanResponse contains information gleaned during a successful Scan operation.