|
|
| version 1.14, 2004/04/24 04:32:03 | version 1.15, 2004/05/19 22:53:04 |
|---|---|
| Line 639 ext2_mountfs(struct vnode *devvp, struct | Line 639 ext2_mountfs(struct vnode *devvp, struct |
| struct buf *bp; | struct buf *bp; |
| struct ext2_sb_info *fs; | struct ext2_sb_info *fs; |
| struct ext2_super_block * es; | struct ext2_super_block * es; |
| dev_t dev = devvp->v_rdev; | dev_t dev; |
| struct partinfo dpart; | struct partinfo dpart; |
| int havepart = 0; | int havepart = 0; |
| int error, i, size; | int error, i, size; |
| Line 653 ext2_mountfs(struct vnode *devvp, struct | Line 653 ext2_mountfs(struct vnode *devvp, struct |
| */ | */ |
| if ((error = vfs_mountedon(devvp)) != 0) | if ((error = vfs_mountedon(devvp)) != 0) |
| return (error); | return (error); |
| if (vcount(devvp) > 1 && devvp != rootvp) | if (count_udev(devvp) > 0 && devvp != rootvp) |
| return (EBUSY); | return (EBUSY); |
| if ((error = vinvalbuf(devvp, V_SAVE, td, 0, 0)) != 0) | if ((error = vinvalbuf(devvp, V_SAVE, td, 0, 0)) != 0) |
| return (error); | return (error); |
| Line 668 ext2_mountfs(struct vnode *devvp, struct | Line 668 ext2_mountfs(struct vnode *devvp, struct |
| VOP_UNLOCK(devvp, NULL, 0, td); | VOP_UNLOCK(devvp, NULL, 0, td); |
| if (error) | if (error) |
| return (error); | return (error); |
| if (devvp->v_rdev->si_iosize_max != 0) | dev = devvp->v_rdev; |
| mp->mnt_iosize_max = devvp->v_rdev->si_iosize_max; | if (dev->si_iosize_max != 0) |
| mp->mnt_iosize_max = dev->si_iosize_max; | |
| if (mp->mnt_iosize_max > MAXPHYS) | if (mp->mnt_iosize_max > MAXPHYS) |
| mp->mnt_iosize_max = MAXPHYS; | mp->mnt_iosize_max = MAXPHYS; |
| if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, td) != 0) | if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, td) != 0) |
| Line 751 ext2_mountfs(struct vnode *devvp, struct | Line 752 ext2_mountfs(struct vnode *devvp, struct |
| ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs); | ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs); |
| for (i = 0; i < MAXQUOTAS; i++) | for (i = 0; i < MAXQUOTAS; i++) |
| ump->um_quotas[i] = NULLVP; | ump->um_quotas[i] = NULLVP; |
| devvp->v_specmountpoint = mp; | dev->si_mountpoint = mp; |
| if (ronly == 0) | if (ronly == 0) |
| ext2_sbupdate(ump, MNT_WAIT); | ext2_sbupdate(ump, MNT_WAIT); |
| return (0); | return (0); |
| Line 809 ext2_unmount(struct mount *mp, int mntfl | Line 810 ext2_unmount(struct mount *mp, int mntfl |
| if (fs->s_block_bitmap[i]) | if (fs->s_block_bitmap[i]) |
| ULCK_BUF(fs->s_block_bitmap[i]) | ULCK_BUF(fs->s_block_bitmap[i]) |
| ump->um_devvp->v_specmountpoint = NULL; | ump->um_devvp->v_rdev->si_mountpoint = NULL; |
| error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE, td); | error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE, td); |
| vrele(ump->um_devvp); | vrele(ump->um_devvp); |
| bsd_free(fs->s_es, M_UFSMNT); | bsd_free(fs->s_es, M_UFSMNT); |