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

BUG: scheduling while atomic: sbd_reaper in sheepdog block device drive #430

Open
Bambo-Huang opened this issue May 19, 2018 · 0 comments
Open

Comments

@Bambo-Huang
Copy link

Bambo-Huang commented May 19, 2018

submit_sheep_request should not be in atomic context but submit_blocking_sheep_request did so.
So I did a fix as the following:

static void submit_blocking_sheep_request(struct sbd_device *dev, uint64_t oid)
{
	struct sheep_request *req, *t;

	write_lock(&dev->blocking_lock);
	list_for_each_entry_safe(req, t, &dev->blocking_head, list) {
		if (req->oid != oid)
			continue;
		list_del_init(&req->list);
// Fix here, we unlock, do request, and lock it again.
		write_unlock(&dev->blocking_lock);
		submit_sheep_request(req);
		write_lock(&dev->blocking_lock);
	}
	write_unlock(&dev->blocking_lock);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant