Motr  M0
Functional Specification

Functional Specification

This section describes the data structure, external interfaces of the component and briefly identifies the consumers of these interfaces.

Data structures

I/O FOMs use the following data structure:

The Bulk I/O Service is required to maintain run-time context of I/O FOMs. The data structure m0_io_fom_cob_rw maintain required context data.

  • Pointer to generic FOM structure
    This holds the information about generic FOM (e.g. its generic states, type, locality, reply FOP, file operation log etc.)
  • Total number of descriptor for bulk data transfer requested.
  • Current network buffer descriptor index
  • Current index vector list index
  • Batch size for bulk I/O processing.
  • Actual data transferd.
  • STOB identifier
    Storage object identifier which tells the actual device on which I/O operation intended.
  • List of STOB operation vector
    This holds the information required for async STOB I/O (e.g. data segments, operations, channel to signal on completion etc.)
  • List acquired network buffers pointer
    zero-copy fills this buffers in bulk I/O case.

Interfaces

Bulk I/O Service will be implemented as read FOM and write FOM. Since request handler processes FOM, each FOM needs to define its operations:

Bulk I/O FOM type operations:

m0_io_fom_cob_rw_create()    Request handler uses this interface to
                             create I/O FOM.

Bulk I/O FOM operations :

m0_io_fom_cob_rw_locality_get()   Request handler uses this interface to
                                  get the locality for this I/O FOM.
m0_io_fom_cob_rw_tick()           Request handler uses this interface to
                                  execute next phase of I/O FOM.
m0_io_fom_cob_rw_fini()           Request handler uses this interface after
                                  I/O FOM finishes its execution.

Bulk I/O Service type operations :

m0_io_service_init()       This interface will be called by request handler
                           to create & initiate Bulk I/O Service.

Bulk I/O Service operations :

m0_io_service_start()      This interface will be called by request handler
                           to start Buk I/O Service.

m0_io_service_stop()       This interface will be called by request handler
                           to stop Buk I/O Service.

m0_io_service_fini()       This interface will be called by request handler
                           to finish & de-allocate Bulk I/O Service.

Bulk I/O FOM creation & initialization

On receiving of bulk I/O FOP, FOM is created & initialized for respective FOP type. Then it is placed into FOM processing queue.