From owner-svn-src-user@FreeBSD.ORG Sun Feb 15 21:50:09 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63022942; Sun, 15 Feb 2015 21:50:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DCD1C70; Sun, 15 Feb 2015 21:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1FLo9Rt075977; Sun, 15 Feb 2015 21:50:09 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1FLo9km075976; Sun, 15 Feb 2015 21:50:09 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201502152150.t1FLo9km075976@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 15 Feb 2015 21:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r278821 - user/dchagin/lemul/sys/fs/pseudofs X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 21:50:09 -0000 Author: dchagin Date: Sun Feb 15 21:50:08 2015 New Revision: 278821 URL: https://svnweb.freebsd.org/changeset/base/278821 Log: To allow reading pseudofs files by chunks replace sbuf from fixed to autoextend. The problem appears when the user tries to read a small chunk of the pseudofs file. The underlying fill method will fail if the size of the supplied sbuf sb is less than required to contain method data. Modified: user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Modified: user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Sun Feb 15 21:47:43 2015 (r278820) +++ user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Sun Feb 15 21:50:08 2015 (r278821) @@ -662,7 +662,7 @@ pfs_read(struct vop_read_args *va) if (buflen > MAXPHYS) buflen = MAXPHYS; - sb = sbuf_new(sb, NULL, buflen + 1, 0); + sb = sbuf_new_auto(); if (sb == NULL) { error = EIO; goto ret;