|
XMMS2
|
Logs every action so we can redo changes if something crashes. More...
Macros | |
| #define | LOG_SIZE (2*1024*1024) |
Enumerations | |
| enum | log_type_t { LOG_ENTRY_ADD = 0xaddadd, LOG_ENTRY_DEL = 0xde1e7e, LOG_ENTRY_WRAP = 0x123123, LOG_ENTRY_INIT = 0x87654321, LOG_ENTRY_BEGIN = 0x1, LOG_ENTRY_END = 0x2, LOG_ENTRY_WRITING = 0x3, LOG_ENTRY_CHECKPOINT = 0x4 } |
Functions | |
| s4_log_data_t * | _log_create_data () |
| void | _log_free_data (s4_log_data_t *data) |
| void | _log_checkpoint (s4_t *s4) |
| Writes a checkpoint entry to the log, marking that the database has finished being written to disk. More... | |
| int | _log_write (oplist_t *list) |
| Writes all the operations in an oplist to disk. More... | |
| int | _log_open (s4_t *s4) |
| Opens a log file. More... | |
| int | _log_close (s4_t *s4) |
| Closes the log file. More... | |
| void | _log_lock_file (s4_t *s4) |
| Locks the log file. More... | |
| void | _log_unlock_file (s4_t *s4) |
| Unlocks the log file. More... | |
| void | _log_lock_db (s4_t *s4) |
| Locks the database file. More... | |
| void | _log_unlock_db (s4_t *s4) |
| Unlocks the database file. More... | |
| log_number_t | _log_last_synced (s4_t *s4) |
| void | _log_init (s4_t *s4, log_number_t last_checkpoint) |
Logs every action so we can redo changes if something crashes.
| #define LOG_SIZE (2*1024*1024) |
Referenced by _log_free_data(), and _log_write().
| enum log_type_t |
| void _log_checkpoint | ( | s4_t * | s4 | ) |
Writes a checkpoint entry to the log, marking that the database has finished being written to disk.
| s4 | The database to write the log entry to. |
Referenced by _reread_file().
| int _log_close | ( | s4_t * | s4 | ) |
Closes the log file.
| s4 | The database to close the logfile of. |
Referenced by s4_close().
| s4_log_data_t* _log_create_data | ( | void | ) |
Referenced by _sync().
| void _log_free_data | ( | s4_log_data_t * | data | ) |
Referenced by _sync().
| void _log_init | ( | s4_t * | s4, |
| log_number_t | last_checkpoint | ||
| ) |
| log_number_t _log_last_synced | ( | s4_t * | s4 | ) |
Referenced by _reread_file().
| void _log_lock_db | ( | s4_t * | s4 | ) |
Locks the database file.
This is actually a lock set on the log file.
| s4 | The database to log. |
Referenced by _reread_file().
| void _log_lock_file | ( | s4_t * | s4 | ) |
Locks the log file.
It will redo everything new in the log.
| s4 | The database to lock the log of. |
Referenced by s4_begin().
| int _log_open | ( | s4_t * | s4 | ) |
Opens a log file.
| s4 | The database to open the logfile for |
Referenced by s4_open().
| void _log_unlock_db | ( | s4_t * | s4 | ) |
| void _log_unlock_file | ( | s4_t * | s4 | ) |
| int _log_write | ( | oplist_t * | list | ) |
Writes all the operations in an oplist to disk.
| list | The oplist to write. |
Referenced by s4_commit().
1.8.11