From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:07:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1CC1E1E; Thu, 14 Mar 2013 23:07:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D4719118; Thu, 14 Mar 2013 23:07:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EN71o4056853; Thu, 14 Mar 2013 23:07:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EN71iF056852; Thu, 14 Mar 2013 23:07:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303142307.r2EN71iF056852@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Mar 2013 23:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248295 - head/sys/geom/gate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2013 23:07:02 -0000 Author: pjd Date: Thu Mar 14 23:07:01 2013 New Revision: 248295 URL: http://svnweb.freebsd.org/changeset/base/248295 Log: We don't need buffer to handle BIO_DELETE, so don't check buffer size for it. This fixes handling BIO_DELETE larger than MAXPHYS. Modified: head/sys/geom/gate/g_gate.c Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Thu Mar 14 23:03:48 2013 (r248294) +++ head/sys/geom/gate/g_gate.c Thu Mar 14 23:07:01 2013 (r248295) @@ -813,7 +813,7 @@ g_gate_ioctl(struct cdev *dev, u_long cm } } ggio->gctl_cmd = bp->bio_cmd; - if ((bp->bio_cmd == BIO_DELETE || bp->bio_cmd == BIO_WRITE) && + if (bp->bio_cmd == BIO_WRITE && bp->bio_length > ggio->gctl_length) { mtx_unlock(&sc->sc_queue_mtx); ggio->gctl_length = bp->bio_length;