Boost.AFIO    Boost C++ Libraries
Functions
Enumerating file extents

Functions

virtual std::vector< future
< std::vector< std::pair
< off_t, off_t > > > > 
boost::afio::dispatcher::extents (const std::vector< future<>> &ops)=0
 Schedule a batch of asynchronous extent enumerations after preceding operations.
future< std::vector< std::pair
< off_t, off_t > > > 
boost::afio::async_extents (future<> _precondition)
 Asynchronous extent enumeration after a preceding operation.
std::vector< std::pair< off_t,
off_t > > 
boost::afio::extents (future<> _precondition)
 Synchronous extent enumeration after a preceding operation.
std::vector< std::pair< off_t,
off_t > > 
boost::afio::extents (error_code &_ec, future<> _precondition)
 Synchronous extent enumeration after a preceding operation.

Function Documentation

future< std::vector< std::pair< off_t, off_t > > > boost::afio::dispatcher::extents ( const std::vector< future<>> &  ops) [pure virtual]

Schedule a batch of asynchronous extent enumerations after preceding operations.

In a sparsely allocated file, it can be useful to know which extents contain non-zero data. Note that this call is racy (i.e. the extents are enumerated one by one on some platforms, this means they may be out of date with respect to one another) when other threads or processes are concurrently calling zero() or write() - this is a host OS API limitation.

Returns:
A batch of stl_future vectors of extents.
Parameters:
opsA batch of op handles.
{ [raceguarantee FreeBSD, Linux, OS X..Very racy, even individual extent offset and length can race. The following filters are applied before returning results: (i) Any extent whose end appears before its start is retried (ii) Sequences of contiguous extents are merged into single extents.] [raceguarantee Windows..Race free.] }

Definition at line 3725 of file afio.hpp.

future<std::vector<std::pair<off_t, off_t> > > boost::afio::async_extents ( future<>  _precondition)

Asynchronous extent enumeration after a preceding operation.

Returns:
A `future<std::vector<std::pair<off_t, off_t>>>`
Parameters:
_preconditionThe precondition to use.

{ [raceguarantee FreeBSD, Linux, OS X..Very racy, even individual extent offset and length can race. The following filters are applied before returning results: (i) Any extent whose end appears before its start is retried (ii) Sequences of contiguous extents are merged into single extents.] [raceguarantee Windows..Race free.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of extents in each file.} {extents_example}

Definition at line 5601 of file afio.hpp.

std::vector<std::pair<off_t, off_t> > boost::afio::extents ( future<>  _precondition)

Synchronous extent enumeration after a preceding operation.

Returns:
A vector of extents
Parameters:
_preconditionThe precondition to use.

{distinguish, throwing} { [raceguarantee FreeBSD, Linux, OS X..Very racy, even individual extent offset and length can race. The following filters are applied before returning results: (i) Any extent whose end appears before its start is retried (ii) Sequences of contiguous extents are merged into single extents.] [raceguarantee Windows..Race free.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of extents in each file.} {extents_example}

Definition at line 5623 of file afio.hpp.

std::vector<std::pair<off_t, off_t> > boost::afio::extents ( error_code &  _ec,
future<>  _precondition 
)

Synchronous extent enumeration after a preceding operation.

Returns:
A vector of extents
Parameters:
_ecError code to set.
_preconditionThe precondition to use.

{distinguish, non throwing} { [raceguarantee FreeBSD, Linux, OS X..Very racy, even individual extent offset and length can race. The following filters are applied before returning results: (i) Any extent whose end appears before its start is retried (ii) Sequences of contiguous extents are merged into single extents.] [raceguarantee Windows..Race free.] } {Amortised O(1) to dispatch. Amortised O(M) to complete where M is the average number of extents in each file.} {extents_example}

Definition at line 5646 of file afio.hpp.


January, 2014

Copyright © 2013-2014 Niall Douglas, Cork, Ireland
Copyright © 2013 Paul Kirth, California
Documentation is generated by Doxygen