Fix journal dirty_start position tracking and some debug prints
Fixes two bugs found during HDD testing :-) 1) OSD crashed with "BUG: Attempt to overwrite used offset of the journal" during `fio -bs=900k -iodepth=128` test with 16 MB journal 2) OSD stalled during `fio -bs=512k -iodepth=128` test with 64 MB journal
This commit is contained in:
@@ -661,8 +661,13 @@ void blockstore_impl_t::release_journal_sectors(blockstore_op_t *op)
|
||||
uint64_t s = PRIV(op)->min_flushed_journal_sector;
|
||||
while (1)
|
||||
{
|
||||
if (s != (1+journal.cur_sector) && journal.sector_info[s-1].flush_count == 0)
|
||||
if (!journal.sector_info[s-1].dirty && journal.sector_info[s-1].flush_count == 0)
|
||||
{
|
||||
if (s == (1+journal.cur_sector))
|
||||
{
|
||||
// Forcibly move to the next sector and move dirty position
|
||||
journal.in_sector_pos = journal.block_size;
|
||||
}
|
||||
// We know for sure that we won't write into this sector anymore
|
||||
uint64_t new_ds = journal.sector_info[s-1].offset + journal.block_size;
|
||||
if (new_ds >= journal.len)
|
||||
|
||||
Reference in New Issue
Block a user