2010-09-23 17:01:41 +04:00
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
# ifndef fooreadaheadcommonhfoo
# define fooreadaheadcommonhfoo
/***
This file is part of systemd .
Copyright 2010 Lennart Poettering
systemd is free software ; you can redistribute it and / or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
systemd is distributed in the hope that it will be useful , but
WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
General Public License for more details .
You should have received a copy of the GNU General Public License
along with systemd ; If not , see < http : //www.gnu.org/licenses/>.
* * */
# include <sys/stat.h>
2010-09-28 23:46:14 +04:00
# include <sys/types.h>
# include "macro.h"
2010-09-23 17:01:41 +04:00
# define READAHEAD_FILE_SIZE_MAX (128*1024*1024)
2010-09-25 17:39:38 +04:00
int file_verify ( int fd , const char * fn , off_t file_size_max , struct stat * st ) ;
2010-09-23 17:01:41 +04:00
int fs_on_ssd ( const char * p ) ;
2011-03-04 01:03:26 +03:00
int fs_on_read_only ( const char * p ) ;
2010-09-23 17:01:41 +04:00
2010-09-25 15:32:54 +04:00
bool enough_ram ( void ) ;
2010-09-26 17:50:14 +04:00
int open_inotify ( void ) ;
2010-09-28 23:46:14 +04:00
typedef struct ReadaheadShared {
pid_t collect ;
pid_t replay ;
} _packed_ ReadaheadShared ;
ReadaheadShared * shared_get ( void ) ;
2010-10-26 23:28:39 +04:00
int bump_request_nr ( const char * p ) ;
2010-09-23 17:01:41 +04:00
# endif