MCPcopy Create free account
hub / github.com/daos-stack/daos / format

Method format

src/control/server/instance_exec.go:34–58  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

32}
33
34func (ei *EngineInstance) format(ctx context.Context) error {
35 idx := ei.Index()
36
37 ei.log.Debugf("instance %d: checking if storage is formatted", idx)
38 if err := ei.awaitStorageReady(ctx); err != nil {
39 return errors.Wrap(err, "awaitStorageReady")
40 }
41 if err := ei.createSuperblock(); err != nil {
42 return errors.Wrap(err, "createSuperblock")
43 }
44
45 if !ei.hasSuperblock() {
46 return errors.Errorf("instance %d: no superblock after format", idx)
47 }
48
49 // After we know that the instance storage is ready, fire off
50 // any callbacks that were waiting for this state.
51 for _, readyFn := range ei.onStorageReady {
52 if err := readyFn(ctx); err != nil {
53 return errors.Wrap(err, "onStorageReady readyFn")
54 }
55 }
56
57 return nil
58}
59
60func (ei *EngineInstance) initIncarnationFromSuperblock() error {
61 if ei.incarnation > 0 {

Callers 15

startRunnerMethod · 0.95
msg_to_githubMethod · 0.80
parse_fileMethod · 0.80
__str__Method · 0.80
__str__Method · 0.80
__repr__Method · 0.80
connectMethod · 0.80
disconnectMethod · 0.80
local2globalMethod · 0.80
global2localMethod · 0.80
pool_svc_stopMethod · 0.80
pool_queryMethod · 0.80

Calls 6

IndexMethod · 0.95
awaitStorageReadyMethod · 0.95
createSuperblockMethod · 0.95
hasSuperblockMethod · 0.95
DebugfMethod · 0.65
ErrorfMethod · 0.65