X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Freadahead-common.h;h=964ca1f2fa976dbb705b8b75a0c1a1273f45ba24;hb=8e486ef03b992d4c0d373195f5e8d1c3a200bc30;hp=5d8f1a34fa26b9e3e97988eaaeebd7149d0eaee3;hpb=6e3eb5ba18172ed965e6b91fd7fc05de6c86f739;p=elogind.git diff --git a/src/readahead-common.h b/src/readahead-common.h index 5d8f1a34f..964ca1f2f 100644 --- a/src/readahead-common.h +++ b/src/readahead-common.h @@ -23,12 +23,27 @@ ***/ #include +#include + +#include "macro.h" #define READAHEAD_FILE_SIZE_MAX (128*1024*1024) -#define READAHEAD_FILES_MAX (16*1024) -int file_verify(int fd, const char *fn, struct stat *st); +int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st); int fs_on_ssd(const char *p); +bool enough_ram(void); + +int open_inotify(void); + +typedef struct ReadaheadShared { + pid_t collect; + pid_t replay; +} _packed_ ReadaheadShared; + +ReadaheadShared *shared_get(void); + +int bump_request_nr(const char *p); + #endif