Revert "bdev: temporarily allow bdev descriptors to be closed from any thread"
Now that vhost closes bdev descriptors on the same thread
that opened them, we can reintroduce thread asserts into
the bdev layer.
This reverts commit 283abcb9a2
.
Change-Id: I1acc455df0674b808ecf2fa58dffd183db6cf3c2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459168
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
feaf45d31a
commit
efef26e234
@ -4340,10 +4340,7 @@ spdk_bdev_close(struct spdk_bdev_desc *desc)
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Closing descriptor %p for bdev %s on thread %p\n", desc, bdev->name,
|
||||
spdk_get_thread());
|
||||
|
||||
if (desc->thread != spdk_get_thread()) {
|
||||
SPDK_ERRLOG("Descriptor %p for bdev %s closed on wrong thread (%p, expected %p)\n",
|
||||
desc, bdev->name, spdk_get_thread(), desc->thread);
|
||||
}
|
||||
assert(desc->thread == spdk_get_thread());
|
||||
|
||||
pthread_mutex_lock(&bdev->internal.mutex);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user