diff options
author | Vito Caputo <vito.caputo@coreos.com> | 2016-02-12 04:59:57 -0800 |
---|---|---|
committer | Vito Caputo <vito.caputo@coreos.com> | 2016-02-19 18:50:20 -0800 |
commit | ac2e41f5103ce2c679089c4f8fb6be61d7caec07 (patch) | |
tree | aa9015d7a0e9466e783704d857dd5db0fec70512 /src/core/dbus-scope.h | |
parent | 69a3a6fd3d96101d42a01d0e7d33ae2ef613e54a (diff) |
journal: asynchronous journal_file_set_offline()
This adds a wait flag to journal_file_set_offline(), when false the offline is
performed asynchronously in a separate thread.
When wait is true, if an asynchronous offline is already in-progress it is
restarted and waited for. Otherwise the offline is performed synchronously
without the use of a thread.
journal_file_set_online() cancels or waits for the asynchronous offline to
complete if in-flight, depending on where in the offline process the thread
happens to be. If the thread is in the fsync() phase, it is cancelled and
waiting is unnecessary. Otherwise, the thread is joined before proceeding.
A new offline_state member is added to JournalFile which is used via
atomic operations for communicating between the offline thread and the
journal_file_set_{offline,online}() functions.
Diffstat (limited to 'src/core/dbus-scope.h')
0 files changed, 0 insertions, 0 deletions