diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-08-13 10:56:07 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-08-13 10:56:07 +0000 |
commit | 3a965c0db0ca1905de7b46b17e81ff704b290197 (patch) | |
tree | 0e054c43a681df38a982abee6697789067cb859a /sys/ufs/ufs | |
parent | 608bb3ffdf3065778ccd4fcc96d07088b89147a0 (diff) | |
download | src-3a965c0db0ca1905de7b46b17e81ff704b290197.tar.gz src-3a965c0db0ca1905de7b46b17e81ff704b290197.zip |
Move the special-casing of stat(2)->st_blksize for device files
from UFS to the generic level. For chr/blk devices we don't care
about the blocksize of the filesystem, we want what the device
asked for.
Notes
Notes:
svn path=/head/; revision=49682
Diffstat (limited to 'sys/ufs/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 4ae4f98a2dbb..e65f22b48160 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 - * $Id: ufs_vnops.c,v 1.117 1999/08/08 18:43:04 phk Exp $ + * $Id: ufs_vnops.c,v 1.118 1999/08/13 10:10:12 phk Exp $ */ #include "opt_quota.h" @@ -396,20 +396,7 @@ ufs_getattr(ap) vap->va_ctime.tv_nsec = ip->i_ctimensec; vap->va_flags = ip->i_flags; vap->va_gen = ip->i_gen; - - /* - * Use the information contained in v_rdev for VBLK and VCHR - * vnodes, and in the underlying mount point for (typically) VREG - * vnodes. Note that vp->v_specmountpoint can be NULL. - */ - if (vp->v_type == VBLK) { - vap->va_blocksize = vp->v_rdev->si_bsize_best; - } else if (vp->v_type == VCHR) { - vap->va_blocksize = vp->v_rdev->si_bsize_max; - } else { - vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize; - } - + vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize; vap->va_bytes = dbtob((u_quad_t)ip->i_blocks); vap->va_type = IFTOVT(ip->i_mode); vap->va_filerev = ip->i_modrev; |