fs_io.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 06 Disk I/O Routines */
10 
11 #ifndef SQUID_FS_IO_H_
12 #define SQUID_FS_IO_H_
13 
14 #include "mem/forward.h"
15 #include "typedefs.h" //DRCB, DWCB
16 
17 class MemBuf;
18 
19 // POD
21 {
22 public:
23  int fd;
24  off_t offset;
25  int req_len;
26  char *buf;
29  void *client_data;
30 };
31 
32 // POD
33 class dwrite_q
34 {
35 public:
36  off_t file_offset;
37  char *buf;
38  size_t len;
39  size_t buf_offset;
42 };
43 
44 int file_open(const char *path, int mode);
45 void file_close(int fd);
46 void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
47 void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
48 void file_read(int, char *, int, off_t, DRCB *, void *);
49 void safeunlink(const char *path, int quiet);
50 int xrename(const char *from, const char *to);
51 
52 int fsBlockSize(const char *path, int *blksize);
53 int fsStats(const char *, int *, int *, int *, int *);
54 
55 #endif /* SQUID_FS_IO_H_ */
56 
int fsStats(const char *, int *, int *, int *, int *)
Definition: fs_io.cc:554
void file_close(int fd)
Definition: fs_io.cc:76
int file_open(const char *path, int mode)
Definition: fs_io.cc:46
int end_of_file
Definition: fs_io.h:27
size_t buf_offset
Definition: fs_io.h:39
off_t file_offset
Definition: fs_io.h:36
off_t offset
Definition: fs_io.h:24
void safeunlink(const char *path, int quiet)
Definition: fs_io.cc:497
void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *)
Definition: fs_io.cc:344
void DWCB(int, int, size_t, void *)
Definition: typedefs.h:18
void FREE(void *)
Definition: forward.h:36
Definition: fs_io.h:33
void file_read(int, char *, int, off_t, DRCB *, void *)
Definition: fs_io.cc:479
char * buf
Definition: fs_io.h:37
int fsBlockSize(const char *path, int *blksize)
Definition: fs_io.cc:530
char * buf
Definition: fs_io.h:26
size_t len
Definition: fs_io.h:38
FREE * free_func
Definition: fs_io.h:41
static void handler(int signo)
Definition: purge.cc:860
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
void DRCB(int, const char *buf, int size, int errflag, void *data)
Definition: typedefs.h:16
int req_len
Definition: fs_io.h:25
void * client_data
Definition: fs_io.h:29
int fd
Definition: fs_io.h:23
Definition: MemBuf.h:23
DRCB * handler
Definition: fs_io.h:28
dwrite_q * next
Definition: fs_io.h:40
int xrename(const char *from, const char *to)
Definition: fs_io.cc:513
void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB *handler, void *handler_data)
Definition: fs_io.cc:395

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors