#include <DiskThreadsDiskFile.h>

Inheritance diagram for DiskThreadsDiskFile:
Collaboration diagram for DiskThreadsDiskFile:

Public Types

typedef RefCount< DiskFilePointer
 

Public Member Functions

 DiskThreadsDiskFile (char const *path)
 
 ~DiskThreadsDiskFile () override
 
void open (int flags, mode_t mode, RefCount< IORequestor > callback) override
 
void create (int flags, mode_t mode, RefCount< IORequestor > callback) override
 
void read (ReadRequest *) override
 
void write (WriteRequest *) override
 
void close () override
 
bool error () const override
 
int getFD () const override
 
bool canRead () const override
 
bool canWrite () const override
 
bool ioInProgress () const override
 
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 30 of file DiskThreadsDiskFile.cc.

References assert, debugs, path_, and xstrdup.

◆ ~DiskThreadsDiskFile()

DiskThreadsDiskFile::~DiskThreadsDiskFile ( )
override

Definition at line 37 of file DiskThreadsDiskFile.cc.

References doClose(), path_, and safe_free.

Member Function Documentation

◆ canRead()

bool DiskThreadsDiskFile::canRead ( ) const
overridevirtual

Implements DiskFile.

Definition at line 198 of file DiskThreadsDiskFile.cc.

References debugs, and fd.

◆ canWrite()

bool DiskThreadsDiskFile::canWrite ( ) const
overridevirtual

Reimplemented from DiskFile.

Definition at line 222 of file DiskThreadsDiskFile.cc.

References fd.

◆ CBDATA_CLASS()

DiskThreadsDiskFile::CBDATA_CLASS ( DiskThreadsDiskFile  )
private

◆ close()

void DiskThreadsDiskFile::close ( )
overridevirtual

◆ configure()

virtual void DiskFile::configure ( const Config )
inlinevirtualinherited

Reimplemented in IpcIoFile.

Definition at line 42 of file DiskFile.h.

Referenced by IpcIoFile::configure().

◆ create()

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

◆ doClose()

void DiskThreadsDiskFile::doClose ( )
private

◆ error()

bool DiskThreadsDiskFile::error ( ) const
overridevirtual

Implements DiskFile.

Definition at line 125 of file DiskThreadsDiskFile.cc.

References errorOccured.

◆ getFD()

int DiskThreadsDiskFile::getFD ( ) const
inlineoverridevirtual

During migration only

Reimplemented from DiskFile.

Definition at line 32 of file DiskThreadsDiskFile.h.

References fd.

◆ ioInProgress()

bool DiskThreadsDiskFile::ioInProgress ( ) const
overridevirtual

Inform callers if there is IO in progress

Implements DiskFile.

Definition at line 228 of file DiskThreadsDiskFile.cc.

References inProgressIOs.

Referenced by close().

◆ open()

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

◆ 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(), and open().

◆ path_

char const* DiskThreadsDiskFile::path_ = nullptr
private

◆ ReadDone

void DiskThreadsDiskFile::ReadDone
staticprivate

Definition at line 41 of file DiskThreadsDiskFile.h.

Referenced by read().

◆ WriteDone

void DiskThreadsDiskFile::WriteDone
staticprivate

Definition at line 51 of file DiskThreadsDiskFile.h.

Referenced by write().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors