Defines | |
#define | FID_OPTIONS_VARNAME "FID_OPTIONS" |
Name of environment variable parsed by libfid. | |
Functions | |
void | fid_options_parse (void) |
Parse environment variable for library configuration. | |
Variables | |
int | fid_options_prefetch |
int | fid_options_smart_prefetch |
#define FID_OPTIONS_VARNAME "FID_OPTIONS" |
Name of environment variable parsed by libfid.
Definition at line 31 of file options.h.
Referenced by fid_options_parse().
void fid_options_parse | ( | void | ) |
Parse environment variable for library configuration.
This function is called automatically by functions that can be influenced by an environment variable whose name is defined by FID_OPTIONS_VARNAME, and is usually not called directly from client code. The function parses the content of the environment variable once only.
The environment variable is expected to contain a colon separated list of option names. Currently, the following options are recognized (unknown options are silently ignored).
NOPREFETCH
Usually every file opened for reading is prefetched automatically to fill the file cache in order to prevent excessive time consumption for searching within files. Setting this option disables automatic prefetching entirely.FORCEPREFETCH
If prefetching is not disabled, then the default behavior is to prefetch a file only if it is very small, or if the kernel reports that it, or large parts thereof, are not present in file cache already. Setting this option causes the library to always read the whole file (still quite fast when cached already, but much slower than asking the kernel beforehand and relying on these information).
Definition at line 60 of file options.c.
References fid_options_prefetch, fid_options_smart_prefetch, and FID_OPTIONS_VARNAME.
Referenced by fid_file_map().
For internal use only.
Definition at line 31 of file options.c.
Referenced by fid_file_map(), and fid_options_parse().
For internal use only.
Definition at line 32 of file options.c.
Referenced by fid_file_map(), and fid_options_parse().