devmapper docs: small fixes
Signed-off-by: Gavin Inglis <giinglis@amazon.com>
This commit is contained in:
@@ -55,13 +55,13 @@ var (
|
||||
ErrAlreadyExists = errors.New("object already exists")
|
||||
)
|
||||
|
||||
// PoolMetadata keeps device info for the given thin-pool device, it also responsible for
|
||||
// generating next available device ids and tracking devmapper transaction numbers
|
||||
// PoolMetadata keeps device info for the given thin-pool device, generates next available device ids,
|
||||
// and tracks devmapper transaction numbers
|
||||
type PoolMetadata struct {
|
||||
db *bolt.DB
|
||||
}
|
||||
|
||||
// NewPoolMetadata creates new or open existing pool metadata database
|
||||
// NewPoolMetadata creates new or opens existing pool metadata database
|
||||
func NewPoolMetadata(dbfile string) (*PoolMetadata, error) {
|
||||
db, err := bolt.Open(dbfile, 0600, nil)
|
||||
if err != nil {
|
||||
@@ -133,7 +133,7 @@ func (m *PoolMetadata) ChangeDeviceState(ctx context.Context, name string, state
|
||||
|
||||
// MarkFaulty marks the given device and corresponding devmapper device ID as faulty.
|
||||
// The snapshotter might attempt to recreate a device in 'Faulty' state with another devmapper ID in
|
||||
// subsequent calls, and in case of success it's status will be changed to 'Created' or 'Activated'.
|
||||
// subsequent calls, and in case of success its status will be changed to 'Created' or 'Activated'.
|
||||
// The devmapper dev ID will remain in 'deviceFaulty' state until manually handled by a user.
|
||||
func (m *PoolMetadata) MarkFaulty(ctx context.Context, name string) error {
|
||||
return m.db.Update(func(tx *bolt.Tx) error {
|
||||
|
||||
Reference in New Issue
Block a user