From owner-p4-projects@FreeBSD.ORG Thu Mar 1 19:31:32 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 53200106574A; Thu, 1 Mar 2012 19:31:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E7471065742 for ; Thu, 1 Mar 2012 19:31:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id EACFA8FC19 for ; Thu, 1 Mar 2012 19:31:31 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q21JVVhK044450 for ; Thu, 1 Mar 2012 19:31:31 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q21JVVQI044446 for perforce@freebsd.org; Thu, 1 Mar 2012 19:31:31 GMT (envelope-from jhb@freebsd.org) Date: Thu, 1 Mar 2012 19:31:31 GMT Message-Id: <201203011931.q21JVVQI044446@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 207176 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2012 19:31:32 -0000 http://p4web.freebsd.org/@@207176?ac=10 Change 207176 by jhb@jhb_jhbbsd on 2012/03/01 19:31:06 Compile. Affected files ... .. //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#5 edit Differences ... ==== //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#5 (text+ko) ==== @@ -442,17 +442,21 @@ return (0); } fs = ip->i_fs; - if (blkoffset(fs, start) != 0) { + if (blkoff(fs, start) != 0) { size = blksize(fs, ip, lblkno(fs, start)); - start += size - blkoffset(fs, start); - KASSERT(blkoffset(fs, start) == 0, + start += size - blkoff(fs, start); + KASSERT(blkoff(fs, start) == 0, ("failed to adjust range start to block boundary")); } - if (end < ip->i_size && blkoffset(fs, end) != 0) { - end -= blkoffset(fs, end); - KASSERT(blkoffset(fs, end) == 0, + if (end < ip->i_size && blkoff(fs, end) != 0) { + end -= blkoff(fs, end); + KASSERT(blkoff(fs, end) == 0, ("failed to adjust range end to block boundary")); } + /* XXX: Debug */ + if (ap->a_start != start || ap->a_end != end) + printf("ffs_advise(DONTNEED): (%#lx-%#lx) -> (%#lx-%#lx)", + ap->a_start, ap->a_end, start, end); VOP_UNLOCK(vp, 0); if (start > end) return (0);