-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flamenco, repair: cache good repair peers to file
- Loading branch information
1 parent
9da11e2
commit 82ecf83
Showing
9 changed files
with
266 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
# logfile_fd: It can be disabled by configuration, but typically tiles | ||
# will open a log file on boot and write all messages there. | ||
unsigned int logfile_fd | ||
# good_peer_cache_file_fd: The list of known good repair peers, which we read | ||
# at boot and then periodically write to. | ||
unsigned int logfile_fd, unsigned int good_peer_cache_file_fd | ||
|
||
# logging: all log messages are written to a file and/or pipe | ||
# | ||
# 'WARNING' and above are written to the STDERR pipe, while all messages | ||
# are always written to the log file. | ||
# | ||
# good_peer_cache_file: we periodically write out the good peers to the file | ||
# | ||
# arg 0 is the file descriptor to write to. The boot process ensures | ||
# that descriptor 2 is always STDERR. | ||
write: (or (eq (arg 0) 2) | ||
(eq (arg 0) logfile_fd)) | ||
(eq (arg 0) logfile_fd) | ||
(eq (arg 0) good_peer_cache_file_fd)) | ||
|
||
# good_peer_cache_file_fd: | ||
# | ||
# We need to seek to the start of the file when we read it in. | ||
lseek: (eq (arg 0) good_peer_cache_file_fd) | ||
|
||
# good_peer_cache_file_fd: | ||
# | ||
# We need to truncate the file to 0 before we start writing to it. | ||
ftruncate: (and (eq (arg 0) good_peer_cache_file_fd) | ||
(eq (arg 1) 0)) | ||
|
||
# logging: 'WARNING' and above fsync the logfile to disk immediately | ||
# | ||
# arg 0 is the file descriptor to fsync. | ||
fsync: (eq (arg 0) logfile_fd) | ||
|
||
# good_peer_cache_file: we read in the good peer cache file on boot | ||
read: (eq (arg 0) good_peer_cache_file_fd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.