From owner-cvs-all@FreeBSD.ORG Tue Oct 2 14:48:49 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404D116A417; Tue, 2 Oct 2007 14:48:49 +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 B8B4B13C45D; Tue, 2 Oct 2007 14:48:48 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l92EmmsO065064; Tue, 2 Oct 2007 14:48:48 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from pjd@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l92EmmEw065063; Tue, 2 Oct 2007 14:48:48 GMT (envelope-from pjd) Message-Id: <200710021448.l92EmmEw065063@repoman.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 2 Oct 2007 14:48:48 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_sx.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 14:48:49 -0000 pjd 2007-10-02 14:48:48 UTC FreeBSD src repository Modified files: sys/kern kern_sx.c Log: Fix sx_try_slock(), so it only fails when there is an exclusive owner. Before that fix, it was possible for the function to fail if number of sharers changes between 'x = sx->sx_lock' step and atomic_cmpset_acq_ptr() call. This fixes ZFS problem when ZFS returns strange EIO errors under load. In ZFS there is a code that depends on the fact that sx_try_slock() can only fail if there is an exclusive owner. Discussed with: attilio Reviewed by: jhb Approved by: re (kensmith) Revision Changes Path 1.55 +12 -9 src/sys/kern/kern_sx.c