drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
os0file.h
Go to the documentation of this file.
1/***********************************************************************
2
3Copyright (C) 1995, 2010, Innobase Oy. All Rights Reserved.
4Copyright (C) 2009, Percona Inc.
5
6Portions of this file contain modifications contributed and copyrighted
7by Percona Inc.. Those modifications are
8gratefully acknowledged and are described briefly in the InnoDB
9documentation. The contributions by Percona Inc. are incorporated with
10their permission, and subject to the conditions contained in the file
11COPYING.Percona.
12
13This program is free software; you can redistribute it and/or modify it
14under the terms of the GNU General Public License as published by the
15Free Software Foundation; version 2 of the License.
16
17This program is distributed in the hope that it will be useful, but
18WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
20Public License for more details.
21
22You should have received a copy of the GNU General Public License along
23with this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26***********************************************************************/
27
28/**************************************************/
34
35#pragma once
36#ifndef os0file_h
37#define os0file_h
38
39#include "univ.i"
40
41#ifndef __WIN__
42#include <dirent.h>
43#include <sys/stat.h>
44#include <time.h>
45#endif
46
49
50#ifdef UNIV_DO_FLUSH
51extern ibool os_do_not_call_flush_at_each_write;
52#endif /* UNIV_DO_FLUSH */
53extern ibool os_has_said_disk_full;
55extern ibool os_aio_print_debug;
56
58extern ulint os_file_n_pending_preads;
60extern ulint os_file_n_pending_pwrites;
61
63extern ulint os_n_pending_reads;
65extern ulint os_n_pending_writes;
66
67#ifdef __WIN__
68
71#define WIN_ASYNC_IO
72
74#define UNIV_NON_BUFFERED_IO
75
76#endif
77
78#ifdef __WIN__
80# define os_file_t HANDLE
84# define OS_FILE_FROM_FD(fd) (HANDLE) _get_osfhandle(fd)
85#else
87typedef int os_file_t;
91# define OS_FILE_FROM_FD(fd) fd
92#endif
93
95extern ulint os_innodb_umask;
96
103
104#define OS_FILE_LOG_BLOCK_SIZE srv_log_block_size
105
107#define OS_FILE_OPEN 51
108#define OS_FILE_CREATE 52
109#define OS_FILE_OVERWRITE 53
110#define OS_FILE_OPEN_RAW 54
111#define OS_FILE_CREATE_PATH 55
112#define OS_FILE_OPEN_RETRY 56 /* for os_file_create() on
113 the first ibdata file */
114
115#define OS_FILE_READ_ONLY 333
116#define OS_FILE_READ_WRITE 444
117#define OS_FILE_READ_ALLOW_DELETE 555 /* for ibbackup */
118
119/* Options for file_create */
120#define OS_FILE_AIO 61
121#define OS_FILE_NORMAL 62
122/* @} */
123
125#define OS_DATA_FILE 100
126#define OS_LOG_FILE 101
127/* @} */
128
130#define OS_FILE_NOT_FOUND 71
131#define OS_FILE_DISK_FULL 72
132#define OS_FILE_ALREADY_EXISTS 73
133#define OS_FILE_PATH_ERROR 74
134#define OS_FILE_AIO_RESOURCES_RESERVED 75 /* wait for OS aio resources
135 to become available again */
136#define OS_FILE_SHARING_VIOLATION 76
137#define OS_FILE_ERROR_NOT_SPECIFIED 77
138#define OS_FILE_INSUFFICIENT_RESOURCE 78
139#define OS_FILE_AIO_INTERRUPTED 79
140#define OS_FILE_OPERATION_ABORTED 80
141/* @} */
144#define OS_FILE_READ 10
145#define OS_FILE_WRITE 11
146
147#define OS_FILE_LOG 256 /* This can be ORed to type */
148/* @} */
149
150#define OS_AIO_N_PENDING_IOS_PER_THREAD 32
154#define OS_AIO_NORMAL 21
156#define OS_AIO_IBUF 22
158#define OS_AIO_LOG 23
159#define OS_AIO_SYNC 24
168
169#define OS_AIO_SIMULATED_WAKE_LATER 512
175/* @} */
177#define OS_WIN31 1
178#define OS_WIN95 2
179#define OS_WINNT 3
180#define OS_WIN2000 4
181#define OS_WINXP 5
183#define OS_WINVISTA 6
185#define OS_WIN7 7
187
188
189extern ulint os_n_file_reads;
190extern ulint os_n_file_writes;
191extern ulint os_n_fsyncs;
192
193extern uint32_t srv_log_block_size;
194
195#ifdef UNIV_PFS_IO
196/* Keys to register InnoDB I/O with performance schema */
197extern mysql_pfs_key_t innodb_file_data_key;
198extern mysql_pfs_key_t innodb_file_log_key;
199extern mysql_pfs_key_t innodb_file_temp_key;
200
201/* Following four macros are instumentations to register
202various file I/O operations with performance schema.
2031) register_pfs_file_open_begin() and register_pfs_file_open_end() are
204used to register file creation, opening, closing and renaming.
2052) register_pfs_file_io_begin() and register_pfs_file_io_end() are
206used to register actual file read, write and flush */
207# define register_pfs_file_open_begin(state, locker, key, op, name, \
208 src_file, src_line) \
209do { \
210 if (PSI_server) { \
211 locker = PSI_server->get_thread_file_name_locker( \
212 state, key, op, name, &locker); \
213 if (locker) { \
214 PSI_server->start_file_open_wait( \
215 locker, src_file, src_line); \
216 } \
217 } \
218} while (0)
219
220# define register_pfs_file_open_end(locker, file) \
221do { \
222 if (locker) { \
223 PSI_server->end_file_open_wait_and_bind_to_descriptor( \
224 locker, file); \
225 } \
226} while (0)
227
228# define register_pfs_file_io_begin(state, locker, file, count, op, \
229 src_file, src_line) \
230do { \
231 if (PSI_server) { \
232 locker = PSI_server->get_thread_file_descriptor_locker( \
233 state, file, op); \
234 if (locker) { \
235 PSI_server->start_file_wait( \
236 locker, count, src_file, src_line); \
237 } \
238 } \
239} while (0)
240
241# define register_pfs_file_io_end(locker, count) \
242do { \
243 if (locker) { \
244 PSI_server->end_file_wait(locker, count); \
245 } \
246} while (0)
247#endif /* UNIV_PFS_IO */
248
249/* Following macros/functions are file I/O APIs that would be performance
250schema instrumented if "UNIV_PFS_IO" is defined. They would point to
251wrapper functions with performance schema instrumentation in such case.
252
253os_file_create
254os_file_create_simple
255os_file_create_simple_no_error_handling
256os_file_close
257os_file_rename
258os_aio
259os_file_read
260os_file_read_no_error_handling
261os_file_write
262
263The wrapper functions have the prefix of "innodb_". */
264
265#ifdef UNIV_PFS_IO
266# define os_file_create(key, name, create, purpose, type, success) \
267 pfs_os_file_create_func(key, name, create, purpose, type, \
268 success, __FILE__, __LINE__)
269
270# define os_file_create_simple(key, name, create, access, success) \
271 pfs_os_file_create_simple_func(key, name, create, access, \
272 success, __FILE__, __LINE__)
273
274# define os_file_create_simple_no_error_handling( \
275 key, name, create_mode, access, success) \
276 pfs_os_file_create_simple_no_error_handling_func( \
277 key, name, create_mode, access, success, __FILE__, __LINE__)
278
279# define os_file_close(file) \
280 pfs_os_file_close_func(file, __FILE__, __LINE__)
281
282# define os_aio(type, mode, name, file, buf, offset, offset_high, \
283 n, message1, message2) \
284 pfs_os_aio_func(type, mode, name, file, buf, offset, \
285 offset_high, n, message1, message2, \
286 __FILE__, __LINE__)
287
288# define os_file_read(file, buf, offset, offset_high, n) \
289 pfs_os_file_read_func(file, buf, offset, offset_high, n, \
290 __FILE__, __LINE__)
291
292# define os_file_read_no_error_handling(file, buf, offset, \
293 offset_high, n) \
294 pfs_os_file_read_no_error_handling_func(file, buf, offset, \
295 offset_high, n, \
296 __FILE__, __LINE__)
297
298# define os_file_write(name, file, buf, offset, offset_high, n) \
299 pfs_os_file_write_func(name, file, buf, offset, offset_high, \
300 n, __FILE__, __LINE__)
301
302# define os_file_flush(file) \
303 pfs_os_file_flush_func(file, __FILE__, __LINE__)
304
305# define os_file_rename(key, oldpath, newpath) \
306 pfs_os_file_rename_func(key, oldpath, newpath, __FILE__, __LINE__)
307#else /* UNIV_PFS_IO */
308
309/* If UNIV_PFS_IO is not defined, these I/O APIs point
310to original un-instrumented file I/O APIs */
311# define os_file_create(key, name, create, purpose, type, success) \
312 os_file_create_func(name, create, purpose, type, success)
313
314# define os_file_create_simple(key, name, create, access, success) \
315 os_file_create_simple_func(name, create_mode, access, success)
316
317# define os_file_create_simple_no_error_handling( \
318 key, name, create_mode, access, success) \
319 os_file_create_simple_no_error_handling_func( \
320 name, create_mode, access, success)
321
322# define os_file_close(file) os_file_close_func(file)
323
324# define os_aio(type, mode, name, file, buf, offset, offset_high, \
325 n, message1, message2) \
326 os_aio_func(type, mode, name, file, buf, offset, offset_high, n,\
327 message1, message2)
328
329# define os_file_read(file, buf, offset, offset_high, n) \
330 os_file_read_func(file, buf, offset, offset_high, n)
331
332# define os_file_read_no_error_handling(file, buf, offset, \
333 offset_high, n) \
334 os_file_read_no_error_handling_func(file, buf, offset, offset_high, n)
335
336# define os_file_write(name, file, buf, offset, offset_high, n) \
337 os_file_write_func(name, file, buf, offset, offset_high, n)
338
339# define os_file_flush(file) os_file_flush_func(file)
340
341# define os_file_rename(key, oldpath, newpath) \
342 os_file_rename_func(oldpath, newpath)
343
344#endif /* UNIV_PFS_IO */
345
346/* File types for directory entry data type */
347
348enum os_file_type_enum{
349 OS_FILE_TYPE_UNKNOWN = 0,
350 OS_FILE_TYPE_FILE, /* regular file */
351 OS_FILE_TYPE_DIR, /* directory */
352 OS_FILE_TYPE_LINK /* symbolic link */
353};
354typedef enum os_file_type_enum os_file_type_t;
355
356/* Maximum path string length in bytes when referring to tables with in the
357'./databasename/tablename.ibd' path format; we can allocate at least 2 buffers
358of this size from the thread stack; that is why this should not be made much
359bigger than 4000 bytes */
360#define OS_FILE_MAX_PATH 4000
362/* Struct used in fetching information of a file in a directory */
364 char name[OS_FILE_MAX_PATH];
365 os_file_type_t type;
366 ib_int64_t size;
367 time_t ctime;
368 time_t mtime;
369 time_t atime;
370};
371typedef struct os_file_stat_struct os_file_stat_t;
372
373#ifdef __WIN__
374typedef HANDLE os_file_dir_t;
375#else
376typedef DIR* os_file_dir_t;
377#endif
378
379#ifdef __WIN__
380/***********************************************************************/
384UNIV_INTERN
385ulint
386os_get_os_version(void);
387/*===================*/
388#endif /* __WIN__ */
389#ifndef UNIV_HOTBACKUP
390/****************************************************************/
392UNIV_INTERN
393void
395/*===================*/
396/***********************************************************************/
400
401FILE*
403/*========================*/
404#endif /* !UNIV_HOTBACKUP */
405/***********************************************************************/
411UNIV_INTERN
414/*============*/
415 const char* dirname,
417 ibool error_is_fatal);
422/***********************************************************************/
425UNIV_INTERN
426int
428/*=============*/
429 os_file_dir_t dir);
430/***********************************************************************/
434UNIV_INTERN
435int
437/*======================*/
438 const char* dirname,
439 os_file_dir_t dir,
440 os_file_stat_t* info);
441/*****************************************************************/
447UNIV_INTERN
448ibool
450/*=====================*/
451 const char* pathname,
453 ibool fail_if_exists);
455/****************************************************************/
461UNIV_INTERN
464/*=======================*/
465 const char* name,
467 ulint create_mode,
474 ulint access_type,
476 ibool* success);
477/****************************************************************/
483UNIV_INTERN
486/*=========================================*/
487 const char* name,
489 ulint create_mode,
493 ulint access_type,
497 ibool* success);
498/****************************************************************/
500UNIV_INTERN
501void
503/*================*/
504 int fd,
505 const char* file_name,
507 const char* operation_name);
509/****************************************************************/
515UNIV_INTERN
518/*================*/
519 const char* name,
521 ulint create_mode,
529 ulint purpose,
536 ulint type,
537 ibool* success);
538/***********************************************************************/
541UNIV_INTERN
542ibool
544/*===========*/
545 const char* name);
546
547/***********************************************************************/
550UNIV_INTERN
551ibool
553/*=====================*/
554 const char* name);
555/***********************************************************************/
561UNIV_INTERN
562ibool
564/*================*/
565 const char* oldpath,
567 const char* newpath);
568/***********************************************************************/
574UNIV_INTERN
575ibool
577/*===============*/
578 os_file_t file);
579
580#ifdef UNIV_PFS_IO
581/****************************************************************/
588UNIV_INLINE
590pfs_os_file_create_simple_func(
591/*===========================*/
592 mysql_pfs_key_t key,
593 const char* name,
595 ulint create_mode,
602 ulint access_type,
604 ibool* success,
605 const char* src_file,
606 ulint src_line);
607
608/****************************************************************/
616UNIV_INLINE
618pfs_os_file_create_simple_no_error_handling_func(
619/*=============================================*/
620 mysql_pfs_key_t key,
621 const char* name,
623 ulint create_mode,
627 ulint access_type,
631 ibool* success,
632 const char* src_file,
633 ulint src_line);
634
635/****************************************************************/
642UNIV_INLINE
644pfs_os_file_create_func(
645/*====================*/
646 mysql_pfs_key_t key,
647 const char* name,
649 ulint create_mode,
657 ulint purpose,
664 ulint type,
665 ibool* success,
666 const char* src_file,
667 ulint src_line);
668
669/***********************************************************************/
674UNIV_INLINE
675ibool
676pfs_os_file_close_func(
677/*===================*/
678 os_file_t file,
679 const char* src_file,
680 ulint src_line);
681/*******************************************************************/
687UNIV_INLINE
688ibool
689pfs_os_file_read_func(
690/*==================*/
691 os_file_t file,
692 void* buf,
693 ulint offset,
695 ulint offset_high,
697 ulint n,
698 const char* src_file,
699 ulint src_line);
700
701/*******************************************************************/
708UNIV_INLINE
709ibool
710pfs_os_file_read_no_error_handling_func(
711/*====================================*/
712 os_file_t file,
713 void* buf,
714 ulint offset,
716 ulint offset_high,
718 ulint n,
719 const char* src_file,
720 ulint src_line);
721
722/*******************************************************************/
728UNIV_INLINE
729ibool
730pfs_os_aio_func(
731/*============*/
732 ulint type,
733 ulint mode,
734 const char* name,
736 os_file_t file,
737 void* buf,
739 ulint offset,
741 ulint offset_high,
743 ulint n,
744 fil_node_t* message1,
748 void* message2,
752 const char* src_file,
753 ulint src_line);
754/*******************************************************************/
760UNIV_INLINE
761ibool
762pfs_os_file_write_func(
763/*===================*/
764 const char* name,
766 os_file_t file,
767 const void* buf,
768 ulint offset,
770 ulint offset_high,
772 ulint n,
773 const char* src_file,
774 ulint src_line);
775/***********************************************************************/
782UNIV_INLINE
783ibool
784pfs_os_file_flush_func(
785/*===================*/
786 os_file_t file,
787 const char* src_file,
788 ulint src_line);
789
790/***********************************************************************/
796UNIV_INLINE
797ibool
798pfs_os_file_rename_func(
799/*====================*/
800 mysql_pfs_key_t key,
801 const char* oldpath,
803 const char* newpath,
804 const char* src_file,
805 ulint src_line);
806#endif /* UNIV_PFS_IO */
807
808#ifdef UNIV_HOTBACKUP
809/***********************************************************************/
812UNIV_INTERN
813ibool
814os_file_close_no_error_handling(
815/*============================*/
816 os_file_t file);
817#endif /* UNIV_HOTBACKUP */
818/***********************************************************************/
821UNIV_INTERN
822ibool
824/*=============*/
825 os_file_t file,
826 ulint* size,
828 ulint* size_high);
829/***********************************************************************/
832UNIV_INTERN
833ib_int64_t
835/*===========================*/
836 os_file_t file);
837/***********************************************************************/
840UNIV_INTERN
841ibool
843/*=============*/
844 const char* name,
846 os_file_t file,
847 ulint size,
849 ulint size_high);
850/***********************************************************************/
853UNIV_INTERN
854ibool
856/*============*/
857 FILE* file);
858/***********************************************************************/
862UNIV_INTERN
863ibool
865/*===============*/
866 os_file_t file);
867/***********************************************************************/
873UNIV_INTERN
874ulint
876/*===================*/
877 ibool report_all_errors);
879/*******************************************************************/
883UNIV_INTERN
884ibool
886/*==============*/
887 os_file_t file,
888 void* buf,
889 ulint offset,
891 ulint offset_high,
893 ulint n);
894/*******************************************************************/
898UNIV_INTERN
899void
901/*================*/
902 FILE* file,
903 char* str,
904 ulint size);
905/*******************************************************************/
911UNIV_INTERN
912ibool
914/*================================*/
915 os_file_t file,
916 void* buf,
917 ulint offset,
919 ulint offset_high,
921 ulint n);
922
923/*******************************************************************/
928UNIV_INTERN
929ibool
931/*===============*/
932 const char* name,
934 os_file_t file,
935 const void* buf,
936 ulint offset,
938 ulint offset_high,
940 ulint n);
941/*******************************************************************/
944UNIV_INTERN
945ibool
947/*===========*/
948 const char* path,
949 ibool* exists,
950 os_file_type_t* type);
951/****************************************************************/
979UNIV_INTERN
980char*
982/*============*/
983 const char* path);
984/****************************************************************/
987UNIV_INTERN
988ibool
990/*=============================*/
991 const char* path);
992/***********************************************************************
993Initializes the asynchronous io system. Creates one array each for ibuf
994and log i/o. Also creates one array each for read and write where each
995array is divided logically into n_read_segs and n_write_segs
996respectively. The caller must create an i/o handler thread for each
997segment in these arrays. This function also creates the sync array.
998No i/o handler thread needs to be created for that */
999UNIV_INTERN
1000ibool
1001os_aio_init(
1002/*========*/
1003 ulint n_per_seg, /*<! in: maximum number of pending aio
1004 operations allowed per segment */
1005 ulint n_read_segs, /*<! in: number of reader threads */
1006 ulint n_write_segs, /*<! in: number of writer threads */
1007 ulint n_slots_sync); /*<! in: number of slots in the sync aio
1008 array */
1009/***********************************************************************
1010Frees the asynchronous io system. */
1011UNIV_INTERN
1012void
1013os_aio_free(void);
1014/*=============*/
1015
1016/*******************************************************************/
1020UNIV_INTERN
1021ibool
1023/*========*/
1024 ulint type,
1025 ulint mode,
1038 const char* name,
1040 os_file_t file,
1041 void* buf,
1043 ulint offset,
1045 ulint offset_high,
1047 ulint n,
1048 fil_node_t* message1,
1052 void* message2);
1056/************************************************************************/
1059UNIV_INTERN
1060void
1062/*=====================================*/
1063/************************************************************************/
1066UNIV_INTERN
1067void
1069/*=====================================*/
1070/**********************************************************************/
1072UNIV_INTERN
1073void
1075/*=======================================*/
1076/**********************************************************************/
1081UNIV_INTERN
1082void
1084/*============================================*/
1085
1086#ifdef WIN_ASYNC_IO
1087/**********************************************************************/
1095UNIV_INTERN
1096ibool
1097os_aio_windows_handle(
1098/*==================*/
1099 ulint segment,
1107 ulint pos,
1109 fil_node_t**message1,
1114 void** message2,
1115 ulint* type);
1116#endif
1117
1118/**********************************************************************/
1122UNIV_INTERN
1123ibool
1125/*====================*/
1126 ulint segment,
1131 fil_node_t**message1,
1136 void** message2,
1137 ulint* type);
1138/**********************************************************************/
1141UNIV_INTERN
1142ibool
1143os_aio_validate(void);
1144/*=================*/
1145/**********************************************************************/
1147UNIV_INTERN
1148void
1150/*=========*/
1151 FILE* file);
1152/**********************************************************************/
1154UNIV_INTERN
1155void
1157/*======================*/
1158
1159#ifdef UNIV_DEBUG
1160/**********************************************************************/
1163UNIV_INTERN
1164ibool
1165os_aio_all_slots_free(void);
1166/*=======================*/
1167#endif /* UNIV_DEBUG */
1168
1169/*******************************************************************/
1172UNIV_INTERN
1173ibool
1175/*===============*/
1176 const char* path,
1177 os_file_stat_t* stat_info);
1179
1180#if !defined(UNIV_HOTBACKUP)
1181/*********************************************************************/
1185UNIV_INTERN
1186int
1188/*========================*/
1189#endif /* !UNIV_HOTBACKUP */
1190
1191
1192#if defined(LINUX_NATIVE_AIO)
1193/**************************************************************************
1194This function is only used in Linux native asynchronous i/o.
1195Waits for an aio operation to complete. This function is used to wait the
1196for completed requests. The aio array of pending requests is divided
1197into segments. The thread specifies which segment or slot it wants to wait
1198for. NOTE: this function will also take care of freeing the aio slot,
1199therefore no other thread is allowed to do the freeing!
1200@return TRUE if the IO was successful */
1201UNIV_INTERN
1202ibool
1203os_aio_linux_handle(
1204/*================*/
1205 ulint global_seg,
1211 fil_node_t**message1,
1212 void** message2,
1216 ulint* type);
1217#endif /* LINUX_NATIVE_AIO */
1218
1219#ifndef UNIV_NONINL
1220#include "os0file.ic"
1221#endif
1222
1223#endif
UNIV_INTERN ibool os_file_read_no_error_handling_func(os_file_t file, void *buf, ulint offset, ulint offset_high, ulint n)
Definition os0file.cc:2555
UNIV_INTERN ibool os_file_status(const char *path, ibool *exists, os_file_type_t *type)
Definition os0file.cc:2890
UNIV_INTERN ulint os_file_get_last_error(ibool report_all_errors)
Definition os0file.cc:385
UNIV_INTERN int os_file_closedir(os_file_dir_t dir)
Definition os0file.cc:817
UNIV_INTERN ibool os_file_write_func(const char *name, os_file_t file, const void *buf, ulint offset, ulint offset_high, ulint n)
Definition os0file.cc:2687
UNIV_INTERN char * os_file_dirname(const char *path)
Definition os0file.cc:3072
struct fil_node_struct fil_node_t
Definition os0file.h:48
UNIV_INTERN ibool os_aio_simulated_handle(ulint segment, fil_node_t **message1, void **message2, ulint *type)
Definition os0file.cc:4641
UNIV_INTERN ibool os_file_close_func(os_file_t file)
Definition os0file.cc:1807
UNIV_INTERN ibool os_file_read_func(os_file_t file, void *buf, ulint offset, ulint offset_high, ulint n)
Definition os0file.cc:2426
UNIV_INTERN void os_file_set_nocache(int fd, const char *file_name, const char *operation_name)
Definition os0file.cc:1327
UNIV_INTERN os_file_t os_file_create_func(const char *name, ulint create_mode, ulint purpose, ulint type, ibool *success)
Definition os0file.cc:1378
UNIV_INTERN void os_aio_simulated_put_read_threads_to_sleep(void)
Definition os0file.cc:3920
UNIV_INTERN void os_aio_simulated_wake_handler_threads(void)
Definition os0file.cc:3895
FILE * os_file_create_tmpfile(void)
Definition os0file.cc:729
UNIV_INTERN os_file_t os_file_create_simple_func(const char *name, ulint create_mode, ulint access_type, ibool *success)
Definition os0file.cc:1074
UNIV_INTERN ibool os_file_rename_func(const char *oldpath, const char *newpath)
Definition os0file.cc:1767
UNIV_INTERN int os_file_readdir_next_file(const char *dirname, os_file_dir_t dir, os_file_stat_t *info)
Definition os0file.cc:852
UNIV_INTERN void os_aio_print(FILE *file)
Definition os0file.cc:5056
int os_file_t
Definition os0file.h:87
UNIV_INTERN void os_aio_wait_until_no_pending_writes(void)
Definition os0file.cc:3562
ulint os_file_n_pending_pwrites
Definition os0file.cc:301
UNIV_INTERN os_file_t os_file_create_simple_no_error_handling_func(const char *name, ulint create_mode, ulint access_type, ibool *success)
Definition os0file.cc:1217
UNIV_INTERN void os_aio_wake_all_threads_at_shutdown(void)
Definition os0file.cc:3524
UNIV_INTERN ibool os_file_get_size(os_file_t file, ulint *size, ulint *size_high)
Definition os0file.cc:1882
ulint os_n_pending_writes
Definition os0file.cc:303
UNIV_INTERN ibool os_file_flush_func(os_file_t file)
Definition os0file.cc:2109
UNIV_INTERN ibool os_aio_func(ulint type, ulint mode, const char *name, os_file_t file, void *buf, ulint offset, ulint offset_high, ulint n, fil_node_t *message1, void *message2)
Definition os0file.cc:4005
UNIV_INTERN void os_file_read_string(FILE *file, char *str, ulint size)
Definition os0file.cc:2663
UNIV_INTERN ibool os_file_create_subdirs_if_needed(const char *path)
Definition os0file.cc:3102
DIR * os_file_dir_t
Definition os0file.h:374
UNIV_INTERN ibool os_file_set_size(const char *name, os_file_t file, ulint size, ulint size_high)
Definition os0file.cc:1953
ibool os_aio_print_debug
Definition os0file.cc:149
UNIV_INTERN ibool os_file_set_eof(FILE *file)
Definition os0file.cc:2042
UNIV_INTERN ibool os_file_get_status(const char *path, os_file_stat_t *stat_info)
Definition os0file.cc:2962
UNIV_INTERN ibool os_file_delete_if_exists(const char *name)
Definition os0file.cc:1640
ulint os_file_n_pending_preads
Definition os0file.cc:299
UNIV_INTERN int innobase_mysql_tmpfile(void)
ulint os_n_pending_reads
Definition os0file.cc:305
UNIV_INTERN void os_aio_refresh_stats(void)
Definition os0file.cc:5202
UNIV_INTERN ibool os_file_delete(const char *name)
Definition os0file.cc:1702
UNIV_INTERN void os_io_init_simple(void)
Definition os0file.cc:711
ulint os_innodb_umask
Definition os0file.cc:71
UNIV_INTERN ibool os_aio_validate(void)
Definition os0file.cc:5006
UNIV_INTERN ib_int64_t os_file_get_size_as_iblonglong(os_file_t file)
Definition os0file.cc:1930
UNIV_INTERN ibool os_file_create_directory(const char *pathname, ibool fail_if_exists)
Definition os0file.cc:1029
UNIV_INTERN os_file_dir_t os_file_opendir(const char *dirname, ibool error_is_fatal)
Definition os0file.cc:761
ib_int64_t size
Definition os0file.h:364
char name[OS_FILE_MAX_PATH]
Definition os0file.h:362
os_file_type_t type
Definition os0file.h:363