From cae544bcdb073134bcaa2031aeb1f1705030046e Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 5 Jun 2012 13:32:20 -0700 Subject: readahead: Add tool to analyze the contents of the pack file. v3. This patch adds code to compile 'systemd-readahead-analyze' and install it into $bindir. Use this program to parse the contents of the readahead pack file, or an arbitrary pack file and display which files are listed in it, and how much of the files are requested to be readahead. This code is not new - it's partially taken from sreadahead (formerly maintained by Arjan van der Ven and me, and was originally written by me), and adapted with the right bits to parse the systemd readahead pack files, which are slightly different in format. v2 adds a common READAHEAD_PACK_FILE_VERSION used in all the code to provide a quick way to assure all these programs are always synchronized. v3 fixes the integer math. --- src/readahead/readahead-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/readahead/readahead-common.h') diff --git a/src/readahead/readahead-common.h b/src/readahead/readahead-common.h index 9962dd527a..3056a02485 100644 --- a/src/readahead/readahead-common.h +++ b/src/readahead/readahead-common.h @@ -29,6 +29,8 @@ #define READAHEAD_FILE_SIZE_MAX (10*1024*1024) +#define READAHEAD_PACK_FILE_VERSION ";VERSION=2\n" + int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st); int fs_on_ssd(const char *p); -- cgit v1.2.3-54-g00ecf