1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 |
39 * $FreeBSD: head/sys/kern/vfs_vnops.c 55756 2000-01-10 12:04:27Z phk $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/fcntl.h> 45#include <sys/file.h> 46#include <sys/stat.h> 47#include <sys/proc.h> --- 420 unchanged lines hidden (view full) --- 468 * "a filesystem-specific preferred I/O block size for this 469 * object. In some filesystem types, this may vary from file 470 * to file" 471 * Default to zero to catch bogus uses of this field. 472 */ 473 474 if (vap->va_type == VREG) { 475 sb->st_blksize = vap->va_blocksize; |
476 } else if (vn_isdisk(vp, NULL)) { |
477 sb->st_blksize = vp->v_rdev->si_bsize_best; 478 if (sb->st_blksize < vp->v_rdev->si_bsize_phys) 479 sb->st_blksize = vp->v_rdev->si_bsize_phys; 480 if (sb->st_blksize < BLKDEV_IOSIZE) 481 sb->st_blksize = BLKDEV_IOSIZE; 482 } else { 483 sb->st_blksize = 0; 484 } --- 146 unchanged lines hidden --- |