L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4virtio::Svr::Block_request< Ds_data > Class Template Reference

A request to read or write data. More...

#include <virtio-block>

+ Collaboration diagram for L4virtio::Svr::Block_request< Ds_data >:

Public Member Functions

unsigned data_size () const
 Compute the total size of the data in the request.
 
bool has_more ()
 Check if the request contains more data blocks.
 
Data_block next_block ()
 Return next block in scatter-gather list.
 
l4virtio_block_header_t const & header () const
 Return the block request header.
 

Detailed Description

template<typename Ds_data>
class L4virtio::Svr::Block_request< Ds_data >

A request to read or write data.

Definition at line 28 of file virtio-block.

Member Function Documentation

◆ data_size()

template<typename Ds_data >
unsigned L4virtio::Svr::Block_request< Ds_data >::data_size ( ) const
inline

Compute the total size of the data in the request.

Return values
Sizein bytes or 0 if there was an error.
Exceptions
L4::Runtime_error(-L4_EIO)Request has a bad format.

Note that this operation is relatively expensive as it has to iterate over the complete list of blocks.

Definition at line 63 of file virtio-block.

References L4virtio::Svr::Request_processor::has_more(), L4_EIO, L4virtio::Svr::Request_processor::next(), and L4virtio::Svr::Request_processor::start().

+ Here is the call graph for this function:

◆ next_block()

template<typename Ds_data >
Data_block L4virtio::Svr::Block_request< Ds_data >::next_block ( )
inline

Return next block in scatter-gather list.

Returns
Information about the next data block.
Exceptions
L4::Runtime_errorNo more data block is available.
Bad_descriptorVirtio request is corrupted.

Definition at line 113 of file virtio-block.

References L4virtio::Svr::Bad_descriptor::Bad_size, L4virtio::Svr::Request_processor::has_more(), L4_EEXIST, and L4virtio::Svr::Request_processor::next().

+ Here is the call graph for this function:

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