Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbd: crash during shutdown after writeback blocked by IO errors #5767

Merged
8 commits merged into from Sep 13, 2015

Conversation

Projects
None yet
3 participants
@ghost
Copy link

commented Sep 2, 2015

@ghost ghost self-assigned this Sep 2, 2015

@ghost ghost added this to the hammer milestone Sep 2, 2015

@ghost ghost added bug fix rbd labels Sep 2, 2015

ghost pushed a commit that referenced this pull request Sep 2, 2015

Merge pull request #5767: Crash during shutdown after writeback block…
…ed by IO errors

Reviewed-by: Loic Dachary <ldachary@redhat.com>

majianpeng added some commits Feb 3, 2015

osdc: In _readx() only no error can tidy read result.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 540346d)
osdc: Don't pass mutex into ObjectCacher::_wait_for_write.
Because the mutex is the same as ObjectCacher::lock.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit d7cf7ae)
osdc: clean up code in ObjectCacher::Object::map_write
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 9f80c29)
osdc: For trust_enoent is true, there is only one extent.
Now the judgement only in conditon which will return -ENOENT.
But o->exists don't depend on the extent size. It only depend on
trust_enoent. So move this judgement at the first of _readx().
Make this bug ASAP occur.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 2449fdd)
osdc: After write try merge bh.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 1a48a8a)
osdc: Make last missing bh to wake up the reader.
Avoid wakeup early and wait again.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit d582bda)
librbd: Remvoe unused func ImageCtx::read_from_cache.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 101440a)
librbd: Add a paramter:purge_on_error in ImageCtx::invalidate_cache().
If bh_write met error, it will try again. For closing image, if met this
issue, it will trigger a assert:
>>2015-02-03 15:22:49.198292 7ff62d537800 -1 osdc/ObjectCacher.cc: In
function 'ObjectCacher::~ObjectCacher()' thread 7ff62d537800 time
>>2015-02-03 15:22:49.195927osdc/ObjectCacher.cc: 551: FAILED
>>assert(i->empty())

Now add purge_on_error, when shutdown_cache it set true.
In ImageCtx::invalidate_cache, if met error and purge_on_error is true,
purge the dirty bh.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 35def5c)

Conflicts:
	src/librbd/ImageCtx.cc : trivial resolution
@ghost

This comment has been minimized.

Copy link
Author

commented Sep 6, 2015

@dillaman this hammer backport passed the rbd suite (see http://tracker.ceph.com/issues/12701#note-61 for details). Do you think it is ready to be merged ?

Note the trivial conflict resolution at 6c4ccc8, the rest cherry-pick cleanly.

@ghost ghost assigned dillaman and unassigned ghost Sep 6, 2015

@dillaman

This comment has been minimized.

Copy link
Contributor

commented Sep 8, 2015

LGTM

ghost pushed a commit that referenced this pull request Sep 13, 2015

Loic Dachary
Merge pull request #5767 from dachary/wip-12597-hammer
Crash during shutdown after writeback blocked by IO errors

Reviewed-by: Jason Dillaman <dillaman@redhat.com>

@ghost ghost merged commit 23fb811 into ceph:hammer Sep 13, 2015

@ghost ghost changed the title Crash during shutdown after writeback blocked by IO errors rbd: crash during shutdown after writeback blocked by IO errors Sep 13, 2015

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.