fs_io.cc File Reference
#include "squid.h"
#include "comm/Loops.h"
#include "fd.h"
#include "fde.h"
#include "fs_io.h"
#include "globals.h"
#include "MemBuf.h"
#include "StatCounters.h"
#include <cerrno>
Include dependency graph for fs_io.cc:

Go to the source code of this file.

Macros

#define fsbtoblk(num, fsbs, bs)
 

Functions

static void cxx_xfree (void *ptr)
 
int file_open (const char *path, int mode)
 
void file_close (int fd)
 
static void diskCombineWrites (_fde_disk *fdd)
 
static void diskHandleWrite (int fd, void *)
 
void file_write (int fd, off_t file_offset, void const *ptr_to_buf, int len, DWCB *handle, void *handle_data, FREE *free_func)
 
void file_write_mbuf (int fd, off_t off, MemBuf mb, DWCB *handler, void *handler_data)
 
static void diskHandleRead (int fd, void *data)
 
void file_read (int fd, char *buf, int req_len, off_t offset, DRCB *handler, void *client_data)
 
void safeunlink (const char *s, int quiet)
 
bool FileRename (const SBuf &from, const SBuf &to)
 
int fsBlockSize (const char *path, int *blksize)
 
int fsStats (const char *path, int *totl_kb, int *free_kb, int *totl_in, int *free_in)
 

Variables

static PF diskHandleRead
 
static PF diskHandleWrite
 

Macro Definition Documentation

◆ fsbtoblk

#define fsbtoblk (   num,
  fsbs,
  bs 
)
Value:
(((fsbs) != 0 && (fsbs) < (bs)) ? \
(num) / ((bs) / (fsbs)) : (num) * ((fsbs) / (bs)))

Definition at line 523 of file fs_io.cc.

Function Documentation

◆ cxx_xfree()

static void cxx_xfree ( void *  ptr)
static

Definition at line 35 of file fs_io.cc.

References xfree.

Referenced by diskCombineWrites().

◆ diskCombineWrites()

◆ diskHandleRead()

◆ diskHandleWrite()

◆ file_close()

◆ file_open()

◆ file_read()

void file_read ( int  fd,
char *  buf,
int  req_len,
off_t  offset,
DRCB handler,
void *  client_data 
)

◆ file_write()

void file_write ( int  fd,
off_t  file_offset,
void const *  ptr_to_buf,
int  len,
DWCB handle,
void *  handle_data,
FREE free_func 
)

◆ file_write_mbuf()

void file_write_mbuf ( int  fd,
off_t  off,
MemBuf  mb,
DWCB handler,
void *  handler_data 
)

Definition at line 374 of file fs_io.cc.

References MemBuf::buf, file_write(), MemBuf::freeFunc(), handler(), and MemBuf::size.

◆ FileRename()

bool FileRename ( const SBuf from,
const SBuf to 
)

◆ fsBlockSize()

int fsBlockSize ( const char *  path,
int blksize 
)

Definition at line 503 of file fs_io.cc.

References DBG_IMPORTANT, debugs, statvfs::f_frsize, int, xstatvfs(), and xstrerr().

Referenced by Fs::Ufs::UFSSwapDir::init().

◆ fsStats()

int fsStats ( const char *  path,
int totl_kb,
int free_kb,
int totl_in,
int free_in 
)

◆ safeunlink()

Variable Documentation

◆ diskHandleRead

PF diskHandleRead
static

Definition at line 22 of file fs_io.cc.

Referenced by diskHandleRead(), and file_read().

◆ diskHandleWrite

PF diskHandleWrite
static

Definition at line 23 of file fs_io.cc.

Referenced by diskHandleWrite(), file_close(), and file_write().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors