chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fsck: remove symlink from fsck.target to sysinit.target
[elogind.git]
/
src
/
readahead-replay.c
diff --git
a/src/readahead-replay.c
b/src/readahead-replay.c
index f0710e5ddf7ef1cb7d1cac95b5dcef88179c4940..cb93fae806e7cbd3fd552b3ab4d10e230ec6e008 100644
(file)
--- 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 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;
static int unpack_file(FILE *pack) {
char fn[PATH_MAX];
int r = 0, fd = -1;
@@
-143,6
+145,8
@@
static int replay(const char *root) {
goto finish;
}
goto finish;
}
+ posix_fadvise(fileno(pack), 0, 0, POSIX_FADV_WILLNEED);
+
if ((inotify_fd = open_inotify()) < 0) {
r = inotify_fd;
goto finish;
if ((inotify_fd = open_inotify()) < 0) {
r = inotify_fd;
goto finish;
@@
-338,6
+342,12
@@
int main(int argc, char*argv[]) {
return 0;
}
return 0;
}
+ if (!(shared = shared_get()))
+ return 1;
+
+ shared->replay = getpid();
+ __sync_synchronize();
+
if (replay(optind < argc ? argv[optind] : "/") < 0)
return 1;
if (replay(optind < argc ? argv[optind] : "/") < 0)
return 1;