#include <DiskThreadsDiskFile.h>

Inheritance diagram for DiskThreadsDiskFile:
Collaboration diagram for DiskThreadsDiskFile:

Public Types

typedef RefCount< DiskFilePointer
 

Public Member Functions

 DiskThreadsDiskFile (char const *path)
 
 ~DiskThreadsDiskFile ()
 
virtual void open (int flags, mode_t mode, RefCount< IORequestor > callback)
 
virtual void create (int flags, mode_t mode, RefCount< IORequestor > callback)
 
virtual void read (ReadRequest *)
 
virtual void write (WriteRequest *)
 
virtual void close ()
 
virtual bool error () const
 
virtual int getFD () const
 
virtual bool canRead () const
 
virtual bool canWrite () const
 
virtual bool ioInProgress () const
 
virtual void configure (const Config &)
 notes supported configuration options; kids must call this first More...
 

Private Member Functions

 CBDATA_CLASS (DiskThreadsDiskFile)
 
void openDone (int fd, const char *buf, int aio_return, int aio_errno)
 
void doClose ()
 
void readDone (int fd, const char *buf, int len, int errflag, RefCount< ReadRequest > request)
 
void writeDone (int fd, int errflag, size_t len, RefCount< WriteRequest > request)
 

Private Attributes

int fd = -1
 
bool errorOccured = false
 
char const * path_ = nullptr
 
size_t inProgressIOs = 0
 
RefCount< IORequestorioRequestor
 

Static Private Attributes

static AIOCB ReadDone
 
static DWCB WriteDone
 
static AIOCB OpenDone
 

Detailed Description

Definition at line 19 of file DiskThreadsDiskFile.h.

Member Typedef Documentation

◆ Pointer

typedef RefCount<DiskFile> DiskFile::Pointer
inherited

Definition at line 39 of file DiskFile.h.

Constructor & Destructor Documentation

◆ DiskThreadsDiskFile()

DiskThreadsDiskFile::DiskThreadsDiskFile ( char const *  path)

Definition at line 29 of file DiskThreadsDiskFile.cc.

References assert, debugs, path_, and xstrdup.

Referenced by readDone().

◆ ~DiskThreadsDiskFile()

DiskThreadsDiskFile::~DiskThreadsDiskFile ( )

Definition at line 36 of file DiskThreadsDiskFile.cc.

References doClose(), path_, and safe_free.

Member Function Documentation

◆ canRead()

bool DiskThreadsDiskFile::canRead ( ) const
virtual

Implements DiskFile.

Definition at line 197 of file DiskThreadsDiskFile.cc.

References debugs, and fd.

Referenced by getFD().

◆ canWrite()

bool DiskThreadsDiskFile::canWrite ( ) const
virtual

Reimplemented from DiskFile.

Definition at line 221 of file DiskThreadsDiskFile.cc.

References fd.

Referenced by getFD().

◆ CBDATA_CLASS()

DiskThreadsDiskFile::CBDATA_CLASS ( DiskThreadsDiskFile  )
private

◆ close()

void DiskThreadsDiskFile::close ( )
virtual

◆ configure()

virtual void DiskFile::configure ( const Config )
inlinevirtualinherited

◆ create()

void DiskThreadsDiskFile::create ( int  flags,
mode_t  mode,
RefCount< IORequestor callback 
)
virtual

◆ doClose()

void DiskThreadsDiskFile::doClose ( )
private

◆ error()

bool DiskThreadsDiskFile::error ( ) const
virtual

Implements DiskFile.

Definition at line 124 of file DiskThreadsDiskFile.cc.

References buf, errorOccured, fd, OpenDone, and openDone().

◆ getFD()

virtual int DiskThreadsDiskFile::getFD ( ) const
inlinevirtual

During migration only

Reimplemented from DiskFile.

Definition at line 32 of file DiskThreadsDiskFile.h.

References canRead(), canWrite(), fd, and ioInProgress().

◆ ioInProgress()

bool DiskThreadsDiskFile::ioInProgress ( ) const
virtual

Inform callers if there is IO in progress

Implements DiskFile.

Definition at line 227 of file DiskThreadsDiskFile.cc.

References assert, buf, fd, IoResult< RT >::file, inProgressIOs, len, ReadDone, readDone(), and IoResult< RT >::request.

Referenced by close(), and getFD().

◆ open()

void DiskThreadsDiskFile::open ( int  flags,
mode_t  mode,
RefCount< IORequestor callback 
)
virtual

◆ openDone()

void DiskThreadsDiskFile::openDone ( int  fd,
const char *  buf,
int  aio_return,
int  aio_errno 
)
private

◆ read()

◆ readDone()

void DiskThreadsDiskFile::readDone ( int  fd,
const char *  buf,
int  len,
int  errflag,
RefCount< ReadRequest request 
)
private

◆ write()

◆ writeDone()

void DiskThreadsDiskFile::writeDone ( int  fd,
int  errflag,
size_t  len,
RefCount< WriteRequest request 
)
private

Member Data Documentation

◆ errorOccured

bool DiskThreadsDiskFile::errorOccured = false
private

Definition at line 55 of file DiskThreadsDiskFile.h.

Referenced by create(), error(), open(), and openDone().

◆ fd

int DiskThreadsDiskFile::fd = -1
private

◆ inProgressIOs

size_t DiskThreadsDiskFile::inProgressIOs = 0
private

Definition at line 57 of file DiskThreadsDiskFile.h.

Referenced by create(), ioInProgress(), open(), openDone(), read(), readDone(), write(), and writeDone().

◆ ioRequestor

RefCount<IORequestor> DiskThreadsDiskFile::ioRequestor
private

Definition at line 60 of file DiskThreadsDiskFile.h.

Referenced by close(), create(), open(), openDone(), read(), readDone(), and writeDone().

◆ OpenDone

void DiskThreadsDiskFile::OpenDone
staticprivate

Definition at line 58 of file DiskThreadsDiskFile.h.

Referenced by create(), error(), and open().

◆ path_

char const* DiskThreadsDiskFile::path_ = nullptr
private

◆ ReadDone

void DiskThreadsDiskFile::ReadDone
staticprivate

Definition at line 41 of file DiskThreadsDiskFile.h.

Referenced by ioInProgress(), and read().

◆ WriteDone

void DiskThreadsDiskFile::WriteDone
staticprivate

Definition at line 51 of file DiskThreadsDiskFile.h.

Referenced by readDone(), and write().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors