]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r200124,r200126,
authorpjd <pjd@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 10 Dec 2009 18:38:40 +0000 (18:38 +0000)
committerpjd <pjd@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 10 Dec 2009 18:38:40 +0000 (18:38 +0000)
commitb6e7d2339b9ad56dc8065974eb845c7448ac2836
tree92cfe16b0bf5cfc350d0a6aa444747ea6830d2ac
parent744d806d7dd98c62bfc463a29c234391e4ae1691
MFC r200124,r200126,

r200124:

Avoid using additional variable for storing an error if we are not going
to do anything with it.

r200126:

Fix deadlock when ZVOLs are present and we are replacing dead component or
calling scrub when pool is in a degraded state. It will try to taste ZVOLs,
which will lead to deadlock, as ZVOL will try to acquire the same locks as
replace/scrub is holding already.

We can't simply skip provider based on their GEOM class, because ZVOL can have
providers build on top of it and we need to skip those as well.

We do it by asking for ZFS::iszvol attribute. Any ZVOL-based provider will give
us positive answer and we have to skip those providers.

This way we remove possibility to create ZFS pools on top of ZVOLs, but it is
not very useful anyway.

I believe deadlock is still possible in some very complex situations like when
we have MD provider on top of UFS file on top of ZVOL. When we try to replace
dead component in the pool mentioned ZVOL is based on, there might be a
deadlock when ZFS will try to taste MD provider. There is no easy way to detect
that, but it isn't very common.

r200125,r200158:

Fix order of looking for providers.

Before r200125 the order of looking for providers was wrong. It was:
1. Find provider by name.
2. Find provider by guid.
3. Find provider by name and guid.

Where it should have been:
1. Find provider by name and guid.
2. Find provider by guid.
3. Find provider by name.

git-svn-id: svn://svn.freebsd.org/base/stable/8@200362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c