Fixes deadlock during import of ZVOLs #1491

wants to merge 1 commit into


None yet

4 participants


Small patch to fix issue #1488:

One must set_capacity() to 0 unless calling setcapacity() after
you call add_disk(), according to these references: */

ryao commented Jun 3, 2013

I suggest squashing the commits into a single commit using git rebase -i.



The rebased commit is f6d9cb0 . I am new to rebasing, so let me know if this looks right or needs changed in any way.


@ryao, looks like the rebase didn't work as I expected, I have <<<<< >>>>> arrows in the code... I'll fix it and push a new commit.


@ryao, nevermind, it looks good on github. Let me know if you have anything else you need in order to commit this. It would be great to have the bugfix upstream.

ryao commented Jun 8, 2013

@ewheelerinc You should push the rebased commits to this branch to update the pull request.

ryao commented Jun 9, 2013

In specific, it would be best to have a single commit that looks like this:

By the way, this might resolve the following bug that was filed in the Gentoo bug tracker:


Regarding the patch, I understand what needs to be done, but at this point I don't know how to invoke git to have github see this pull as showing only commit f6d9cb0 . Can you give me a short list of commands that should make this pull for a single patch?

By the way, this might resolve the following bug that was filed in the Gentoo bug tracker:

Excellent! My issue was at boot time also. Here is the code which validates this patch, at least in my scenario:

echo =========== Succeeds ======="
zpool import

echo =========== Succeeds ======="
zpool export zpool

echo "=========== Fails ======="
rmmod zfs zunicode zavl zcommon znvpair spl
modprobe zfs
zpool import
zpool import -f zpool # fails here
sleep 1
zpool list

for this post I will use these terms, if you have them named differently, use your conventions inplace.
origin - your repository
zfsonlinux - this upstream repository

What's happening here is that you made the pull request from your master branch, so now any commits you push to your master branch show up as additional content for this pull request. If you want this pull request to contain only commit f6d9cb0, then I recommend calling:

git push -f origin f6d9cb0:master

This will force your branch called master to only contain the commit you want, and will remove the other commits. You cannot push any new data to your master branch until after the pull request is closed, or it will continue to show up in this pull request.

In the future, or now if you feel like closing this request, when you start work on a new idea/fix, you can create a new git branch with a descriptive name, in this case

git checkout -b setCapacityBug zfsonlinux/master

Then do your work on it, and push it to your repo with

git push origin setCapacityBug:setCapacityBug

then open a pull request from origin/setCapacityBug to zfsonlinux/master, then do something like:

git checkout master
git merge setCapacityBug

so you can continue working off your changes, which have been merged to your master branch, but you are no longer changing the setCapacityBug branch which is included in your pull request.


@stevenburgess @ryao

Thanks for your git help, I now have f6d9cb0 posted as a single commit in master. I'll use branches in the future to simplify things.

Merge on!


Closing this issue until we have a patch we can safely apply for all kernels.

@behlendorf behlendorf closed this Nov 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment