mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
bcache: fix busy loop with too many errors
When bcache tries to write data to a faulty device, it may get out of caching blocks and then just busy-loops on a CPU - so this check protects this by checking if there is already max_io (~64) errored blocks.
This commit is contained in:
parent
41f9e372c0
commit
0fe58fc54f
@ -1,5 +1,6 @@
|
|||||||
Version 2.03.11 -
|
Version 2.03.11 -
|
||||||
==================================
|
==================================
|
||||||
|
Fix bcache when device has too many failing writes.
|
||||||
Fix bcache waiting for IO completion with failing disks.
|
Fix bcache waiting for IO completion with failing disks.
|
||||||
Configure use own python path name order to prefer using python3.
|
Configure use own python path name order to prefer using python3.
|
||||||
Add configure --enable-editline support as an alternative to readline.
|
Add configure --enable-editline support as an alternative to readline.
|
||||||
|
@ -964,6 +964,11 @@ static struct block *_new_block(struct bcache *cache, int di, block_address i, b
|
|||||||
if (dm_list_empty(&cache->io_pending))
|
if (dm_list_empty(&cache->io_pending))
|
||||||
_writeback(cache, 16); // FIXME: magic number
|
_writeback(cache, 16); // FIXME: magic number
|
||||||
_wait_all(cache);
|
_wait_all(cache);
|
||||||
|
if (dm_list_size(&cache->errored) >= cache->max_io) {
|
||||||
|
log_debug("bcache no new blocks for di %d index %u with >%d errors.",
|
||||||
|
di, (uint32_t) i, cache->max_io);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log_debug("bcache no new blocks for di %d index %u",
|
log_debug("bcache no new blocks for di %d index %u",
|
||||||
di, (uint32_t) i);
|
di, (uint32_t) i);
|
||||||
|
Loading…
Reference in New Issue
Block a user