From owner-svn-src-all@FreeBSD.ORG Wed Jan 26 17:12:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E14D1065672; Wed, 26 Jan 2011 17:12:27 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1886C8FC1C; Wed, 26 Jan 2011 17:12:26 +0000 (UTC) Received: by iwn39 with SMTP id 39so1112066iwn.13 for ; Wed, 26 Jan 2011 09:12:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jXZesPiZ1E76m6YXGS1jxWkTvMZqgjpRbDsjZh8j+OI=; b=QRdDpANRzZMU/4xYVGhHihiavA6TgCwZA63CLw8WBzBhALu7ccTi2F4bqdOYR5mq5g TODxszgjizfXBY/wV8uT72XLXWtwbKi2amiG4BV0/5acamlnzm5hTRaIemHL/Qmw8GFa rnrn3QsXC3zEzLE8cmfHSpEEbzfXaTHZYCzu0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=HoEp0w3VbXmwB/VHqheOv18TWN0xIWQl7H/KIxtINhbAaVITH1heEKjf5AD76H57uC yNBHCFi5x4ddLTIHJDucvBRd5mPOupWpRMMAEgPF4s7jVN9snva8opNs4bA1bzAOYus/ 0UEC4hdQ1NAhLa44spNgw+peMZGJbViaPXVgg= MIME-Version: 1.0 Received: by 10.231.31.131 with SMTP id y3mr8541060ibc.179.1296061945978; Wed, 26 Jan 2011 09:12:25 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.231.160.147 with HTTP; Wed, 26 Jan 2011 09:12:25 -0800 (PST) In-Reply-To: References: <201101251739.p0PHdqKX044842@svn.freebsd.org> Date: Wed, 26 Jan 2011 09:12:25 -0800 X-Google-Sender-Auth: 1KRcZsQlYVtpjPI_b4LtnU_sXro Message-ID: From: mdf@FreeBSD.org To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217830 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2011 17:12:27 -0000 On Wed, Jan 26, 2011 at 1:37 AM, Robert Watson wrote: > On Tue, 25 Jan 2011, Matthew D Fleming wrote: > >> .Dv SBUF_AUTOEXTEND . >> .Pp >> The >> +.Fn sbuf_new_for_sysctl >> +function will set up an sbuf with a drain function to use >> +.Fn SYSCTL_OUT >> +when the internal buffer fills. >> +The sysctl old buffer will be wired, which allows for doing an >> +.Fn sbuf_printf >> +while holding a mutex. >> +.Pp >> +The >> .Fn sbuf_delete >> function clears the >> .Fa sbuf > > Hmm. =A0Is this description missing mention of how wiring failures are > handled? (Also, it should probably mention that this call can sleep for > potentially quite long periods of time, even if sbuf_printf (and friends) > can't). I'm not sure how much to write, since some of the wiring failures are dealt with by the sysctl subsystem and are not documented. The current state of the actual code is that a failure in vslock(9) is ignored, unless it's ENOMEM in which case sysctl_wire_old_buffer sets the sysctl_req->validlen to 0, which would behave perhaps slightly unexpectedly for the user since no data will be copied out. Any non-ENOMEM failure from vslock() presumably would also have been a failure from SYSCTL_OUT and this does get squashed, perhaps incorrectly. I'll think about saving the error code so that sbuf_finish can report it if nothing else has gone wrong. Thanks, matthew