Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2010 11:58:35 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r204638 - head/sys/kern
Message-ID:  <201003031158.35080.jhb@freebsd.org>
In-Reply-To: <201003031618.o23GI5Pr000438@svn.freebsd.org>
References:  <201003031618.o23GI5Pr000438@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003031158.35080.jhb>