block_request Struct Reference
[Block Device]

A block device request. More...

#include <device.h>

Collaboration diagram for block_request:
Collaboration graph
[legend]

Data Fields

struct slist buf_list
void(* req_done )(struct block_device *bdev, struct block_request *req)
void * context
enum status_code status
struct block_devicebdev

Detailed Description

A block device request.

This structure represents an asynchronous request to a block device. It is allocated by calling block_device::prepare_req(). After initializing all the necessary fields, call block_request::req_submit() to submit it for I/O. When it is done, block_request::req_done() will be called by the driver.

Definition at line 73 of file device.h.


Field Documentation

List of buffers associated with this request

Definition at line 75 of file device.h.

Referenced by blk_req_add_buffer(), blk_req_add_buffer_list(), dataflash_alloc_req(), and dataflash_submit_buf_list().

Arbitrary data pointer associated with this request, for use by the submitter.

Definition at line 98 of file device.h.

Referenced by tsfs_read_page_done().

void(* block_request::req_done)(struct block_device *bdev, struct block_request *req)

Function provided by the client to be called when this request is completed.

Parameters:
bdev The Block Device that handled the request
req The request that was completed.

Definition at line 85 of file device.h.

Status code set by the block device driver upon completion of this request.

This field is always updated before req_done() is called, and before buf_list_done() if an error occurred during transfer of that particular buffer list. While the transfer is still in progress, including during the last buf_list_done() callback, it contains the value -STATUS_IN_PROGRESS.

Definition at line 109 of file device.h.

Referenced by dataflash_prepare_req().


The documentation for this struct was generated from the following file:
Generated on Thu Apr 29 15:18:25 2010 for display-training by  doxygen 1.6.3