

Go to the source code of this file.
Classes | |
class | dread_ctrl |
class | dwrite_q |
Functions | |
int | file_open (const char *path, int mode) |
void | file_close (int fd) |
void | file_write (int, off_t, void const *, int len, DWCB *, void *, FREE *) |
void | file_write_mbuf (int fd, off_t, MemBuf mb, DWCB *handler, void *handler_data) |
void | file_read (int, char *, int, off_t, DRCB *, void *) |
void | safeunlink (const char *path, int quiet) |
bool | FileRename (const SBuf &from, const SBuf &to) |
int | fsBlockSize (const char *path, int *blksize) |
int | fsStats (const char *, int *, int *, int *, int *) |
Function Documentation
◆ file_close()
void file_close | ( | int | fd | ) |
Definition at line 76 of file fs_io.cc.
References assert, debugs, StatCounters::disk, diskHandleWrite, F(), fd_close(), fd_table, file_close(), NULL, PROF_start, PROF_stop, statCounter, and StatCounters::syscalls.
Referenced by Rock::Rebuild::~Rebuild(), Fs::Ufs::UFSSwapDir::~UFSSwapDir(), Fs::Ufs::UFSSwapDir::closeLog(), Fs::Ufs::UFSSwapDir::closeTmpSwapLog(), DiskerClose(), diskHandleWrite(), BlockingFile::doClose(), DiskThreadsDiskFile::doClose(), MmappedFile::doClose(), file_close(), MimeIcon::load(), TemplateFile::loadFromFile(), logfile_mod_stdio_close(), logfile_mod_stdio_rotate(), logfile_mod_udp_close(), netdbReloadState(), Fs::Ufs::UFSSwapDir::openTmpSwapLog(), Fs::Ufs::RebuildState::rebuildFromDirectory(), send_announce(), UFSCleanLog::write(), and Fs::Ufs::UFSSwapDir::writeCleanDone().
◆ file_open()
Definition at line 46 of file fs_io.cc.
References commSetCloseOnExec(), debugs, StatCounters::disk, DISK_ERROR, FD_FILE, fd_open(), FILE_MODE, file_open(), PROF_start, PROF_stop, statCounter, StatCounters::syscalls, and xstrerr().
Referenced by Fs::Ufs::UFSSwapDir::closeTmpSwapLog(), DiskThreadsDiskFile::create(), DiskerOpen(), file_open(), Fs::Ufs::RebuildState::getNextFile(), MimeIcon::load(), TemplateFile::loadFromFile(), logfile_mod_stdio_open(), logfile_mod_stdio_rotate(), netdbReloadState(), BlockingFile::open(), DiskThreadsDiskFile::open(), MmappedFile::open(), Fs::Ufs::UFSSwapDir::openLog(), Fs::Ufs::UFSSwapDir::openTmpSwapLog(), send_announce(), Rock::Rebuild::start(), Fs::Ufs::UFSSwapDir::writeCleanDone(), and Fs::Ufs::UFSSwapDir::writeCleanStart().
◆ file_read()
Definition at line 479 of file fs_io.cc.
References assert, dread_ctrl::buf, buf, cbdataReference, dread_ctrl::client_data, diskHandleRead, dread_ctrl::end_of_file, dread_ctrl::fd, file_read(), dread_ctrl::handler, handler, MEM_DREAD_CTRL, memAllocate(), dread_ctrl::offset, PROF_start, PROF_stop, and dread_ctrl::req_len.
Referenced by file_read(), BlockingFile::read(), and DiskThreadsDiskFile::read().
◆ file_write()
Definition at line 344 of file fs_io.cc.
References assert, dwrite_q::buf, dwrite_q::buf_offset, cbdataReference, diskHandleWrite, F(), fd_table, dwrite_q::file_offset, file_write(), dwrite_q::free_func, handle, dwrite_q::len, len, MEM_DWRITE_Q, memAllocate(), dwrite_q::next, NULL, PROF_start, and PROF_stop.
Referenced by file_write(), file_write_mbuf(), Fs::Ufs::UFSSwapDir::logEntry(), Fs::Ufs::UFSSwapDir::openTmpSwapLog(), BlockingFile::write(), and DiskThreadsDiskFile::write().
◆ file_write_mbuf()
Definition at line 395 of file fs_io.cc.
References MemBuf::buf, file_write(), MemBuf::freeFunc(), handler, and MemBuf::size.
◆ FileRename()
Definition at line 508 of file fs_io.cc.
References SBuf::c_str(), DBG_IMPORTANT, debugs, SBuf::length(), SBuf::rawContent(), and xstrerr().
Referenced by Fs::Ufs::UFSSwapDir::closeTmpSwapLog(), logfile_mod_stdio_rotate(), and Fs::Ufs::UFSSwapDir::writeCleanDone().
◆ fsBlockSize()
Definition at line 531 of file fs_io.cc.
References DBG_IMPORTANT, debugs, statvfs::f_frsize, int, xstatvfs(), and xstrerr().
Referenced by Fs::Ufs::UFSSwapDir::init().
◆ fsStats()
Definition at line 555 of file fs_io.cc.
References DBG_IMPORTANT, debugs, statvfs::f_bfree, statvfs::f_blocks, statvfs::f_ffree, statvfs::f_files, statvfs::f_frsize, fsbtoblk, int, xstatvfs(), and xstrerr().
Referenced by Fs::Ufs::UFSSwapDir::statfs().
◆ safeunlink()
void safeunlink | ( | const char * | path, |
int | quiet | ||
) |
Definition at line 497 of file fs_io.cc.
References DBG_IMPORTANT, debugs, StatCounters::disk, statCounter, StatCounters::syscalls, and xstrerr().
Referenced by Fs::Ufs::UFSSwapDir::DirClean(), Fs::Ufs::UFSSwapDir::openTmpSwapLog(), RemoveInstance(), and unlinkdUnlink().