Motr  M0
io_request_ops Struct Reference

#include <file_internal.h>

Collaboration diagram for io_request_ops:
Collaboration graph

Data Fields

int(* iro_iomaps_prepare )(struct io_request *req)
 
void(* iro_iomaps_destroy )(struct io_request *req)
 
int(* iro_user_data_copy )(struct io_request *req, enum copy_direction dir, enum page_attr filter)
 
int(* iro_parity_recalc )(struct io_request *req)
 
int(* iro_parity_verify )(struct io_request *req)
 
int(* iro_iosm_handle )(struct io_request *req)
 
int(* iro_dgmode_read )(struct io_request *req, bool rmw)
 
int(* iro_dgmode_recover )(struct io_request *req)
 
int(* iro_dgmode_write )(struct io_request *req, bool rmw)
 
int(* iro_file_lock )(struct io_request *req)
 
void(* iro_file_unlock )(struct io_request *req)
 

Detailed Description

Operation vector for struct io_request.

Definition at line 1263 of file file_internal.h.

Field Documentation

◆ iro_dgmode_read

int(* iro_dgmode_read) (struct io_request *req, bool rmw)

Handles degraded mode read IO. Issues read IO for pages in all parity groups which need to be read in order to recover lost data.

Parameters
rmwTells whether current io_request is rmw or not.
Precondition
req->ir_state == IRS_READ_COMPLETE.
io_request_invariant(req).
Postcondition
req->ir_state == IRS_DEGRADED_READING.

Definition at line 1326 of file file_internal.h.

◆ iro_dgmode_recover

int(* iro_dgmode_recover) (struct io_request *req)

Recovers lost unit/s by calculating parity over remaining units.

Precondition
req->ir_state == IRS_READ_COMPLETE && io_request_invariant(req).
Postcondition
io_request_invariant(req).

Definition at line 1335 of file file_internal.h.

◆ iro_dgmode_write

int(* iro_dgmode_write) (struct io_request *req, bool rmw)

Handles degraded mode write IO. Finds out whether SNS repair has finished on given global fid or is still due. This is done in context of a distributed lock on the given global file.

Parameters
rmwTells whether current io request is rmw or not.
Precondition
req->ir_state == IRS_WRITE_COMPLETE.
io_request_invariant(req).
Postcondition
req->ir_state == IRS_DEGRADED_READING.

Definition at line 1347 of file file_internal.h.

◆ iro_file_lock

int(* iro_file_lock) (struct io_request *req)

Requests distributed lock on whole file. Must be called before reading or writing

Definition at line 1353 of file file_internal.h.

◆ iro_file_unlock

void(* iro_file_unlock) (struct io_request *req)

Relinquishes the distributed lock on whole file.

Definition at line 1358 of file file_internal.h.

◆ iro_iomaps_destroy

void(* iro_iomaps_destroy) (struct io_request *req)

Finalizes and deallocates pargrp_iomap structures.

Precondition
req != NULL && req->ir_iomaps != NULL.
Postcondition
req->ir_iomaps == NULL && req->ir_iomap_nr == 0.

Definition at line 1277 of file file_internal.h.

◆ iro_iomaps_prepare

int(* iro_iomaps_prepare) (struct io_request *req)

Prepares pargrp_iomap structures for the parity groups spanned by io_request::ir_ivec.

Precondition
req->ir_iomaps == NULL && req->ir_iomap_nr == 0.
Postcondition
req->ir_iomaps != NULL && req->ir_iomap_nr > 0.

Definition at line 1270 of file file_internal.h.

◆ iro_iosm_handle

int(* iro_iosm_handle) (struct io_request *req)

Handles the state transition, status of request and the intermediate copy_{from/to}_user.

Precondition
io_request_invariant(req).

Definition at line 1315 of file file_internal.h.

◆ iro_parity_recalc

int(* iro_parity_recalc) (struct io_request *req)

Recalculates parity for all pargrp_iomap structures in given io_request. Basically, invokes parity_recalc() routine for every pargrp_iomap in io_request::ir_iomaps.

Precondition
io_request_invariant(req) && req->ir_type == IRT_WRITE.
Postcondition
io_request_invariant(req).

Definition at line 1298 of file file_internal.h.

◆ iro_parity_verify

int(* iro_parity_verify) (struct io_request *req)

Verifies parity for all pargrp_iomap structures in given io_request in 'parity verify' mode and for READ request. Basically, invokes parity_verify() routine for every pargrp_iomap in io_request::ir_iomaps.

Precondition
io_request_invariant(req) && req->ir_type == IRT_READ.
Postcondition
io_request_invariant(req).

Definition at line 1308 of file file_internal.h.

◆ iro_user_data_copy

int(* iro_user_data_copy) (struct io_request *req, enum copy_direction dir, enum page_attr filter)

Copies data from/to user-space to/from kernel-space according to given direction and page filter.

Parameters
dirDirection of copy.
filterOnly copy pages that match the filter.
Precondition
io_request_invariant(req).

Definition at line 1286 of file file_internal.h.


The documentation for this struct was generated from the following file: