From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: stable-2.02 - bcache: fix waiting problem for completed IO
Date: Fri, 16 Oct 2020 19:12:02 +0000 (GMT) [thread overview]
Message-ID: <20201016191202.6BB32396EC96@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d32ee355c75d1adcc01e4d14c06c4ddcfab16fc6
Commit: d32ee355c75d1adcc01e4d14c06c4ddcfab16fc6
Parent: 1ed9cfad0954cb2e7c4445fd7ff2105aa044ccf1
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Fri Oct 2 17:18:12 2020 +0200
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Oct 16 18:09:55 2020 +0200
bcache: fix waiting problem for completed IO
Call _wait_all() which does check whether there is still
some pending IO before sleep. Otherwise it may happen
our submitted IO operations have been already dispatched
and this call then endlessly waits for IO which are all done.
This can be reproduced when device returns quickly errors
on write requests.
---
WHATS_NEW | 1 +
lib/device/bcache.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 3112105d7..7dae2ec5e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.188 -
==================================
+ Fix bcache waiting for IO completion with failing disks.
Configure use own python path name order to prefer using python3.
Enhance reporting and error handling when creating thin volumes.
Use revert_lv() on reload error path after vg_revert().
diff --git a/lib/device/bcache.c b/lib/device/bcache.c
index e4e72b6fb..9d4ef90a9 100644
--- a/lib/device/bcache.c
+++ b/lib/device/bcache.c
@@ -956,7 +956,7 @@ static struct block *_new_block(struct bcache *cache, int fd, block_address i, b
if (can_wait) {
if (dm_list_empty(&cache->io_pending))
_writeback(cache, 16); // FIXME: magic number
- _wait_io(cache);
+ _wait_all(cache);
} else {
log_error("bcache no new blocks for fd %d index %u",
fd, (uint32_t) i);
reply other threads:[~2020-10-16 19:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201016191202.6BB32396EC96@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.