Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ngx_open_file_cache.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) Igor Sysoev
4  * Copyright (C) Nginx, Inc.
5  */
6 
7 
8 #include <ngx_config.h>
9 #include <ngx_core.h>
10 
11 
12 #ifndef _NGX_OPEN_FILE_CACHE_H_INCLUDED_
13 #define _NGX_OPEN_FILE_CACHE_H_INCLUDED_
14 
15 
16 #define NGX_OPEN_FILE_DIRECTIO_OFF NGX_MAX_OFF_T_VALUE
17 
18 
19 typedef struct {
22  time_t mtime;
23  off_t size;
24  off_t fs_size;
25  off_t directio;
26  size_t read_ahead;
27 
29  char *failed;
30 
31  time_t valid;
32 
34 
35 #if (NGX_HAVE_OPENAT)
36  size_t disable_symlinks_from;
37  unsigned disable_symlinks:2;
38 #endif
39 
40  unsigned test_dir:1;
41  unsigned test_only:1;
42  unsigned log:1;
43  unsigned errors:1;
44  unsigned events:1;
45 
46  unsigned is_dir:1;
47  unsigned is_file:1;
48  unsigned is_link:1;
49  unsigned is_exec:1;
50  unsigned is_directio:1;
52 
53 
55 
59 
60  u_char *name;
61  time_t created;
62  time_t accessed;
63 
66  time_t mtime;
67  off_t size;
69 
70  uint32_t uses;
71 
72 #if (NGX_HAVE_OPENAT)
73  size_t disable_symlinks_from;
74  unsigned disable_symlinks:2;
75 #endif
76 
77  unsigned count:24;
78  unsigned close:1;
79  unsigned use_event:1;
80 
81  unsigned is_dir:1;
82  unsigned is_file:1;
83  unsigned is_link:1;
84  unsigned is_exec:1;
85  unsigned is_directio:1;
86 
88 };
89 
90 
91 typedef struct {
95 
98  time_t inactive;
100 
101 
102 typedef struct {
108 
109 
110 typedef struct {
111 
112  /* ngx_connection_t stub to allow use c->fd as event ident */
113  void *data;
117 
121 
122 
124  ngx_uint_t max, time_t inactive);
126  ngx_open_file_info_t *of, ngx_pool_t *pool);
127 
128 
129 #endif /* _NGX_OPEN_FILE_CACHE_H_INCLUDED_ */