Diff for /src/sys/kern/vfs_vnops.c between versions 1.19 and 1.20

version 1.19, 2004/05/13 23:49:23 version 1.20, 2004/05/19 22:52:58
Line 538  vn_stat(struct vnode *vp, struct stat *s Line 538  vn_stat(struct vnode *vp, struct stat *s
         if (vap->va_type == VREG) {          if (vap->va_type == VREG) {
                 sb->st_blksize = vap->va_blocksize;                  sb->st_blksize = vap->va_blocksize;
         } else if (vn_isdisk(vp, NULL)) {          } else if (vn_isdisk(vp, NULL)) {
                sb->st_blksize = vp->v_rdev->si_bsize_best;                /*
                if (sb->st_blksize < vp->v_rdev->si_bsize_phys)                 * XXX this is broken.  If the device is not yet open (aka
                        sb->st_blksize = vp->v_rdev->si_bsize_phys;                 * stat() call, aka v_rdev == NULL), how are we supposed
                  * to get a valid block size out of it?
                  */
                 dev_t dev;
 
                 if ((dev = vp->v_rdev) == NULL)
                         dev = udev2dev(vp->v_udev, vp->v_type == VBLK);
                 sb->st_blksize = dev->si_bsize_best;
                 if (sb->st_blksize < dev->si_bsize_phys)
                         sb->st_blksize = dev->si_bsize_phys;
                 if (sb->st_blksize < BLKDEV_IOSIZE)                  if (sb->st_blksize < BLKDEV_IOSIZE)
                         sb->st_blksize = BLKDEV_IOSIZE;                          sb->st_blksize = BLKDEV_IOSIZE;
         } else {          } else {

Removed from v.1.19  
changed lines
  Added in v.1.20