From owner-svn-src-all@FreeBSD.ORG Tue Sep 8 05:46:39 2009 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 50CE41065676; Tue, 8 Sep 2009 05:46:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F8858FC08; Tue, 8 Sep 2009 05:46:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n885kc4P037458; Tue, 8 Sep 2009 05:46:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n885kcHx037457; Tue, 8 Sep 2009 05:46:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200909080546.n885kcHx037457@svn.freebsd.org> From: Alexander Motin Date: Tue, 8 Sep 2009 05:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196964 - head/sys/geom 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: Tue, 08 Sep 2009 05:46:39 -0000 Author: mav Date: Tue Sep 8 05:46:38 2009 New Revision: 196964 URL: http://svn.freebsd.org/changeset/base/196964 Log: Do not check proper request alignment here in geom_dev in production. It will be checked any way later by g_io_check() in g_io_schedule_down(). It is only needed here to not trigger panic from additional check, when INVARIANTS enabled. So cover it with #ifdef INVARIANTS. It saves two 64bit divisions per request. Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Tue Sep 8 05:24:09 2009 (r196963) +++ head/sys/geom/geom_dev.c Tue Sep 8 05:46:38 2009 (r196964) @@ -371,14 +371,14 @@ g_dev_strategy(struct bio *bp) cp = dev->si_drv2; KASSERT(cp->acr || cp->acw, ("Consumer with zero access count in g_dev_strategy")); - +#ifdef INVARIANTS if ((bp->bio_offset % cp->provider->sectorsize) != 0 || (bp->bio_bcount % cp->provider->sectorsize) != 0) { bp->bio_resid = bp->bio_bcount; biofinish(bp, NULL, EINVAL); return; } - +#endif for (;;) { /* * XXX: This is not an ideal solution, but I belive it to