From owner-cvs-src-old@FreeBSD.ORG Sat Dec 5 14:33:32 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B30D10656C3 for ; Sat, 5 Dec 2009 14:33:32 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 68F1D8FC18 for ; Sat, 5 Dec 2009 14:33:32 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5EXWgx029756 for ; Sat, 5 Dec 2009 14:33:32 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nB5EXWt4029755 for cvs-src-old@freebsd.org; Sat, 5 Dec 2009 14:33:32 GMT (envelope-from pjd@repoman.freebsd.org) Message-Id: <200912051433.nB5EXWt4029755@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to pjd@repoman.freebsd.org using -f From: Pawel Jakub Dawidek Date: Sat, 5 Dec 2009 14:33:11 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs vdev_geom.c zvol.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 14:33:32 -0000 pjd 2009-12-05 14:33:11 UTC FreeBSD src repository Modified files: sys/cddl/contrib/opensolaris/uts/common/fs/zfs vdev_geom.c zvol.c Log: SVN rev 200126 on 2009-12-05 14:33:11Z by pjd 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. MFC after: 1 week Revision Changes Path 1.15 +6 -1 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c 1.10 +4 -1 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c