Motr  M0
pg.h File Reference
#include "lib/hash.h"
#include "ioservice/io_fops.h"
#include "layout/pdclust.h"
#include "pool/pool.h"
Include dependency graph for pg.h:

Go to the source code of this file.

Data Structures

struct  data_buf
 
struct  nw_xfer_ops
 
struct  nw_xfer_request
 
struct  pargrp_iomap
 
struct  pargrp_iomap_ops
 
struct  m0_op_io_ops
 
struct  target_ioreq_ops
 
struct  dgmode_rwvec
 
struct  cc_req_fop
 
struct  target_ioreq
 
struct  ioreq_fop
 

Macros

#define __MOTR_PG_H__
 

Enumerations

enum  ioreq_state {
  IRS_UNINITIALIZED, IRS_INITIALIZED, IRS_READING, IRS_WRITING,
  IRS_READ_COMPLETE, IRS_WRITE_COMPLETE, IRS_TRUNCATE, IRS_TRUNCATE_COMPLETE,
  IRS_DEGRADED_READING, IRS_DEGRADED_WRITING, IRS_REQ_COMPLETE, IRS_FAILED
}
 
enum  page_attr {
  PA_NONE = 0, PA_READ = (1 << 0), PA_FULLPAGE_MODIFY = (1 << 1), PA_PARTPAGE_MODIFY = (1 << 2),
  PA_WRITE = (1 << 3), PA_DATA = (1 << 4), PA_PARITY = (1 << 5), PA_COPY_FRMUSR_DONE = (1 << 6),
  PA_READ_FAILED = (1 << 7), PA_DGMODE_READ = (1 << 8), PA_DGMODE_WRITE = (1 << 9), PA_NR = 10,
  PA_NONE = 0, PA_READ = (1 << 0), PA_FULLPAGE_MODIFY = (1 << 1), PA_PARTPAGE_MODIFY = (1 << 2),
  PA_WRITE = (1 << 3), PA_DATA = (1 << 4), PA_PARITY = (1 << 5), PA_COPY_FRMUSR_DONE = (1 << 6),
  PA_READ_FAILED = (1 << 7), PA_DGMODE_READ = (1 << 8), PA_DGMODE_WRITE = (1 << 9), PA_APP_MEMORY = (1 << 10),
  PA_TRUNC = (1 << 11), PA_NR = 12
}
 
enum  pargrp_iomap_rmwtype {
  PIR_NONE, PIR_READOLD, PIR_READREST, PIR_NR,
  PIR_NONE, PIR_READOLD, PIR_READREST, PIR_NR
}
 
enum  pargrp_iomap_state {
  PI_NONE, PI_HEALTHY, PI_DEGRADED, PI_NR,
  PI_NONE, PI_HEALTHY, PI_DEGRADED, PI_NR
}
 
enum  nw_xfer_state {
  NXS_UNINITIALIZED, NXS_INITIALIZED, NXS_INFLIGHT, NXS_COMPLETE,
  NXS_STATE_NR, NXS_UNINITIALIZED, NXS_INITIALIZED, NXS_INFLIGHT,
  NXS_COMPLETE, NXS_STATE_NR
}
 
enum  copy_direction {
  CD_COPY_FROM_USER, CD_COPY_TO_USER, CD_NR, CD_COPY_FROM_APP,
  CD_COPY_TO_APP
}
 
enum  target_ioreq_type {
  TI_NONE, TI_READ_WRITE, TI_COB_CREATE, TI_NONE,
  TI_READ_WRITE, TI_COB_CREATE, TI_COB_TRUNCATE
}
 

Macro Definition Documentation

◆ __MOTR_PG_H__

#define __MOTR_PG_H__

Definition at line 26 of file pg.h.

Enumeration Type Documentation

◆ copy_direction

Enum representing direction of data copy in IO.

Enumerator
CD_COPY_FROM_USER 
CD_COPY_TO_USER 
CD_NR 
CD_COPY_FROM_APP 
CD_COPY_TO_APP 

Definition at line 165 of file pg.h.

◆ ioreq_state

Represents state of IO request call. m0_sm_state_descr structure will be defined for description of all states mentioned below.

Enumerator
IRS_UNINITIALIZED 
IRS_INITIALIZED 
IRS_READING 
IRS_WRITING 
IRS_READ_COMPLETE 
IRS_WRITE_COMPLETE 
IRS_TRUNCATE 
IRS_TRUNCATE_COMPLETE 
IRS_DEGRADED_READING 
IRS_DEGRADED_WRITING 
IRS_REQ_COMPLETE 
IRS_FAILED 

Definition at line 53 of file pg.h.

◆ nw_xfer_state

State of struct nw_xfer_request.

Enumerator
NXS_UNINITIALIZED 
NXS_INITIALIZED 
NXS_INFLIGHT 
NXS_COMPLETE 
NXS_STATE_NR 
NXS_UNINITIALIZED 
NXS_INITIALIZED 
NXS_INFLIGHT 
NXS_COMPLETE 
NXS_STATE_NR 

Definition at line 156 of file pg.h.

◆ page_attr

enum page_attr

Page attributes for all pages spanned by pargrp_iomap::pi_ivec. This enum is also used by data_buf::db_flags.

Enumerator
PA_NONE 

Page not spanned by io vector.

PA_READ 

Page needs to be read.

PA_FULLPAGE_MODIFY 

Page is completely spanned by incoming io vector, which is why file data can be modified while read IO is going on. Such pages need not be read from server. Mutually exclusive with PA_READ and PA_PARTPAGE_MODIFY.

PA_PARTPAGE_MODIFY 

Page is partially spanned by incoming io vector, which is why it has to wait till the whole page (superset) is read first and then it can be modified as per user request. Used only in case of read-modify-write. Mutually exclusive with PA_FULLPAGE_MODIFY.

PA_WRITE 

Page needs to be written.

PA_DATA 

Page contains file data.

PA_PARITY 

Page contains parity.

PA_COPY_FRMUSR_DONE 

Data has been copied from user-space into page. Flag used only when copy_direction == CD_COPY_FROM_USER. This flag is needed since in case of read-old approach, even if page/s are fully modified, they have to be read in order to generate correct parity. Hence for read-modify-write requests, fully modified pages from parity groups which have adopted read-old approach can not be copied before read state finishes.

PA_READ_FAILED 

Read IO failed for given page.

PA_DGMODE_READ 

Page needs to be read in degraded mode read IO state.

PA_DGMODE_WRITE 

Page needs to be written in degraded mode write IO state.

PA_NR 
PA_NONE 

Page not spanned by io vector.

PA_READ 

Page needs to be read.

PA_FULLPAGE_MODIFY 

Page is completely spanned by incoming io vector, which is why file data can be modified while read IO is going on. Such pages need not be read from server. Mutually exclusive with PA_READ and PA_PARTPAGE_MODIFY.

PA_PARTPAGE_MODIFY 

Page is partially spanned by incoming io vector, which is why it has to wait till the whole page (superset) is read first and then it can be modified as per user request. Used only in case of read-modify-write. Mutually exclusive with PA_FULLPAGE_MODIFY.

PA_WRITE 

Page needs to be written.

PA_DATA 

Page contains file data.

PA_PARITY 

Page contains parity.

PA_COPY_FRMUSR_DONE 

Data has been copied from user-space into page. Flag used only when copy_direction == CD_COPY_FROM_USER. This flag is needed since in case of read-old approach, even if page/s are fully modified, they have to be read in order to generate correct parity. Hence for read-modify-write requests, fully modified pages from parity groups which have adopted read-old approach can not be copied before read state finishes.

PA_READ_FAILED 

Read IO failed for given page.

PA_DGMODE_READ 

Page needs to be read in degraded mode read IO state.

PA_DGMODE_WRITE 

Page needs to be written in degraded mode write IO state.

PA_APP_MEMORY 

The application provided this memory, don't try to free it

PA_TRUNC 

This page will be truncated, so don't do RW operation.

PA_NR 

Definition at line 72 of file pg.h.

◆ pargrp_iomap_rmwtype

Type of read approach used by pargrp_iomap structure in case of rmw IO.

Enumerator
PIR_NONE 
PIR_READOLD 
PIR_READREST 
PIR_NR 
PIR_NONE 
PIR_READOLD 
PIR_READREST 
PIR_NR 

Definition at line 139 of file pg.h.

◆ pargrp_iomap_state

State of parity group during IO life-cycle.

Enumerator
PI_NONE 
PI_HEALTHY 
PI_DEGRADED 
PI_NR 
PI_NONE 
PI_HEALTHY 
PI_DEGRADED 
PI_NR 

Definition at line 147 of file pg.h.

◆ target_ioreq_type

A request for a target can be of two types, either for read/write IO or for cob creation for the target on remote ioservice.

Enumerator
TI_NONE 
TI_READ_WRITE 
TI_COB_CREATE 
TI_NONE 
TI_READ_WRITE 
TI_COB_CREATE 
TI_COB_TRUNCATE 

Definition at line 734 of file pg.h.