Motr  M0
M0mkfs

Functions

M0_INTERNAL int main (int argc, char **argv)
 

Detailed Description

Abstract.

This is mkfs stage0 tool. It prepares storage in a way m0d did before and allows to run m0d after that.

Currently mkfs does the following:

Options.

Mkfs fully reuses startup code from motr/setup.c with tiny modificatios in order to support "erase" mode, that is, when mkfs is run on top of existing stobs and structures that have already been used by m0d.

This is why m0_init() and m0_cs_init() and m0_cs_setup_env() are used same way as they used by m0d. The difference is that m0_cs_setup_env() has "mkfs" argument set to true and services and fops handling is not started for mkfs path.

That said, that both, mkfs and m0d share the same set of options such as endpoints, bufer sizes, etc. Obviously, not all of them needed for mkfs as they are clearly m0d start options and not all of them needed by m0d as they may be applied to mkfs once, saved and reussd by m0d in startup time. This set of options that will not change between runs and needs to be saved by mkfs to some storare structures.

This structure that we can use for saving things like that is called seg0. Integration with seg0 is part of stage1 work that will be started as soon as stage0 is finished.

Anticipating stage1 work.

Function Documentation

◆ main()

M0_INTERNAL int main ( int  argc,
char **  argv 
)

Represents various network transports supported by a particular node in a cluster.

Definition at line 95 of file m0mkfs.c.

Here is the call graph for this function: