summaryrefslogtreecommitdiff
path: root/src/readahead-replay.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-28 21:46:14 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-28 21:46:30 +0200
commitd9c7a87b35289e9a5ba94c097e861640d1357e6d (patch)
treec6851ed4484e0b98acb8992d8924eb9166bc151d /src/readahead-replay.c
parentc457e08335e2458821195efdb6b3dd1d106adff2 (diff)
readahead: ignore replay events when collecting
Diffstat (limited to 'src/readahead-replay.c')
-rw-r--r--src/readahead-replay.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/readahead-replay.c b/src/readahead-replay.c
index f0710e5ddf..e22fc04392 100644
--- a/src/readahead-replay.c
+++ b/src/readahead-replay.c
@@ -44,6 +44,8 @@
static off_t arg_file_size_max = READAHEAD_FILE_SIZE_MAX;
+static ReadaheadShared *shared = NULL;
+
static int unpack_file(FILE *pack) {
char fn[PATH_MAX];
int r = 0, fd = -1;
@@ -338,6 +340,12 @@ int main(int argc, char*argv[]) {
return 0;
}
+ if (!(shared = shared_get()))
+ return 1;
+
+ shared->replay = getpid();
+ __sync_synchronize();
+
if (replay(optind < argc ? argv[optind] : "/") < 0)
return 1;