From owner-svn-src-stable@FreeBSD.ORG Thu Jul 24 19:31:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A7E2396 for ; Thu, 24 Jul 2014 19:31:37 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4B662FE4 for ; Thu, 24 Jul 2014 19:31:36 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id 10so2607515lbg.20 for ; Thu, 24 Jul 2014 12:31:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WKS4m3h2iZmIUQb3qvgg0BoGqHQuJG+pH1ISkq3xoUk=; b=AAMv+57Lb1L0815x+jMA4hoGZ9MUsGF7MxIWg5P4wdMi+wFDRtE0xo8VX5702zhh75 bp0oXWem9whVlydn/K2OZ4f96vhtsVbZ9TSNb0VMOFdiQnjK7r/hGKGS8kXevNSmW+Fq IdKvhY7NHGwhHyYvof+9h2baUes2qPWyKgDtk3lGajOExxKlR7SbzfsZpHXqQF+mAfbb nTwLYAVJ3jePq1n56O+gLFtemYDxBVVYBJrPigvjsdfDGlBh/KHRjHtPSTjDOIKtIs8s huUqf14eSIm1AuNXeA6B1vKhrBYjp+HfmFcyD6UUfA21gzIqXAxC0pDUw2b792jQx3el hMjw== X-Gm-Message-State: ALoCoQlzWC9i3sQEmHmNd+gSwDN3ZC1kaPbZiZNJ5Mo0ps8SLiRkFFp4M8CaW2706fxBG9hDG7sV X-Received: by 10.112.34.8 with SMTP id v8mr11178480lbi.47.1406230294101; Thu, 24 Jul 2014 12:31:34 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id v4sm4913374lav.44.2014.07.24.12.31.33 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jul 2014 12:31:33 -0700 (PDT) Message-ID: <53D15F14.9010606@freebsd.org> Date: Thu, 24 Jul 2014 23:31:32 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r269055 - stable/10/sys/kern References: <201407241043.s6OAhFoF061672@svn.freebsd.org> In-Reply-To: <201407241043.s6OAhFoF061672@svn.freebsd.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 19:31:37 -0000 On 24.07.2014 14:43, Konstantin Belousov wrote: > Author: kib > Date: Thu Jul 24 10:43:15 2014 > New Revision: 269055 > URL: http://svnweb.freebsd.org/changeset/base/269055 > > Log: > MFC r268384: > When the lock was stolen from us, retry the whole lock sequence in kernel, > instead of returning EINTR. Does it make dead loop possible? > > Modified: > stable/10/sys/kern/kern_lockf.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/kern/kern_lockf.c > ============================================================================== > --- stable/10/sys/kern/kern_lockf.c Thu Jul 24 10:42:47 2014 (r269054) > +++ stable/10/sys/kern/kern_lockf.c Thu Jul 24 10:43:15 2014 (r269055) > @@ -469,6 +469,9 @@ lf_advlockasync(struct vop_advlockasync_ > return (EOVERFLOW); > end = start + oadd; > } > + > +retry_setlock: > + > /* > * Avoid the common case of unlocking when inode has no locks. > */ > @@ -744,6 +747,11 @@ lf_advlockasync(struct vop_advlockasync_ > sx_destroy(&freestate->ls_lock); > free(freestate, M_LOCKF); > } > + > + if (error == EDOOFUS) { > + KASSERT(ap->a_op == F_SETLK, ("EDOOFUS")); > + goto retry_setlock; > + } > return (error); > } > > @@ -1459,7 +1467,7 @@ lf_setlock(struct lockf *state, struct l > lock->lf_refs++; > error = sx_sleep(lock, &state->ls_lock, priority, lockstr, 0); > if (lf_free_lock(lock)) { > - error = EINTR; > + error = EDOOFUS; > goto out; > } > > -- http://ache.vniz.net/