journal: actually set archived files to archived state
This commit is contained in:
parent
dc36ac6733
commit
cd96b3b86a
|
@ -74,7 +74,8 @@ void journal_file_close(JournalFile *f) {
|
||||||
assert(f);
|
assert(f);
|
||||||
|
|
||||||
if (f->header) {
|
if (f->header) {
|
||||||
if (f->writable)
|
/* Mark the file offline. Don't override the archived state if it already is set */
|
||||||
|
if (f->writable && f->header->state == STATE_ONLINE)
|
||||||
f->header->state = STATE_OFFLINE;
|
f->header->state = STATE_OFFLINE;
|
||||||
|
|
||||||
munmap(f->header, PAGE_ALIGN(sizeof(Header)));
|
munmap(f->header, PAGE_ALIGN(sizeof(Header)));
|
||||||
|
|
Loading…
Reference in a new issue