Fix metadata partition length, fix journal allocation at the end

This commit is contained in:
Vitaliy Filippov
2019-11-27 19:39:18 +03:00
parent 876231d26b
commit 2630e2e3b9
4 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ int blockstore::dequeue_write(blockstore_operation *op)
printf("journal offset %lu is used by %lu:%lu v%lu\n", dirty_it->second.journal_sector, dirty_it->first.oid.inode, dirty_it->first.oid.stripe, dirty_it->first.version);
#endif
// Figure out where data will be
journal.next_free = (journal.next_free + op->len) < journal.len ? journal.next_free : 512;
journal.next_free = (journal.next_free + op->len) <= journal.len ? journal.next_free : 512;
je->oid = op->oid;
je->version = op->version;
je->offset = op->offset;