From owner-svn-src-all@FreeBSD.ORG Wed Mar 3 16:59:13 2010 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 46B2C1065673; Wed, 3 Mar 2010 16:59:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 193338FC2F; Wed, 3 Mar 2010 16:59:13 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C0F3246B0D; Wed, 3 Mar 2010 11:59:12 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 5D3B38A021; Wed, 3 Mar 2010 11:59:11 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Date: Wed, 3 Mar 2010 11:58:35 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003031618.o23GI5Pr000438@svn.freebsd.org> In-Reply-To: <201003031618.o23GI5Pr000438@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003031158.35080.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 03 Mar 2010 11:59:11 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204638 - head/sys/kern 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, 03 Mar 2010 16:59:13 -0000 On Wednesday 03 March 2010 11:18:05 am John Baldwin wrote: > Author: jhb > Date: Wed Mar 3 16:18:04 2010 > New Revision: 204638 > URL: http://svn.freebsd.org/changeset/base/204638 > > Log: > Allow lseek(SEEK_END) to work on disk devices by using the DIOCGMEDIASIZE > to determine the media size. I tried changing devfs_getattr() to return the media size in va_size at Bruce's suggestion, but that ended up not being safe. Specifically, one can only issue DIOCGMEDIASIZE safely if one has an open file handle on a device, and a plain stat(2) (vs fstat(2) or lseek(2)) invokes VOP_GETATTR() without having the file open. -- John Baldwin