• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/hfs/

Lines Matching refs:mp

122 int hfs_vfs_vget(struct mount *mp, ino64_t ino, struct vnode **vpp, vfs_context_t context);
125 static int hfs_changefs(struct mount *mp, struct hfs_mount_args *args);
126 static int hfs_fhtovp(struct mount *mp, int fhlen, unsigned char *fhp, struct vnode **vpp, vfs_context_t context);
131 static int hfs_mount(struct mount *mp, vnode_t devvp, user_addr_t data, vfs_context_t context);
132 static int hfs_mountfs(struct vnode *devvp, struct mount *mp, struct hfs_mount_args *args, int journal_replay_only, vfs_context_t context);
133 static int hfs_reload(struct mount *mp);
134 static int hfs_vfs_root(struct mount *mp, struct vnode **vpp, vfs_context_t context);
136 static int hfs_start(struct mount *mp, int flags, vfs_context_t context);
137 static int hfs_statfs(struct mount *mp, register struct vfsstatfs *sbp, vfs_context_t context);
138 static int hfs_sync(struct mount *mp, int waitfor, vfs_context_t context);
141 static int hfs_unmount(struct mount *mp, int mntflags, vfs_context_t context);
156 hfs_mountroot(mount_t mp, vnode_t rvp, vfs_context_t context)
165 if ((error = hfs_mountfs(rvp, mp, NULL, 0, context)))
169 hfsmp = VFSTOHFS(mp);
181 vfsp = vfs_statfs(mp);
182 (void)hfs_statfs(mp, vfsp, NULL);
195 hfs_mount(struct mount *mp, vnode_t devvp, user_addr_t data, vfs_context_t context)
206 cmdflags = (u_int32_t)vfs_flags(mp) & MNT_CMDFLAGS;
208 hfsmp = VFSTOHFS(mp);
212 if (vfs_isrdonly(mp))
213 return hfs_reload(mp);
220 vfs_isrdonly(mp)) {
233 retval = VFS_SYNC(mp, MNT_WAIT, context);
244 if ((retval = hfs_flushfiles(mp, flags, p))) {
257 if (vnode_mount(hfsmp->hfs_devvp) == mp) {
288 if (vfs_iswriteupgrade(mp)) {
294 if (!(vfs_flags(mp) & MNT_ROOTFS) &&
374 retval = hfs_changefs(mp, &args);
379 vfs_setflags(mp, (u_int64_t)((unsigned int)MNT_DOVOLFS));
383 retval = hfs_mountfs(devvp, mp, &args, 0, context);
387 (void)hfs_statfs(mp, vfs_statfs(mp), context);
457 hfs_changefs(struct mount *mp, struct hfs_mount_args *args)
469 hfsmp = VFSTOHFS(mp);
471 mount_flags = (unsigned int)vfs_flags(mp);
482 vfs_clearflags(mp, (u_int64_t)((unsigned int)MNT_UNKNOWNPERMISSIONS)); /* Just say "No". */
558 vfs_setowner(mp,
579 vnode_iterate(mp, 0, hfs_changefs_callback, (void *)&cargs);
928 hfs_mountfs(struct vnode *devvp, struct mount *mp, struct hfs_mount_args *args,
953 ronly = vfs_isrdonly(mp);
969 vfs_setlocklocal(mp);
1067 vfs_setfsprivate(mp, hfsmp);
1068 hfsmp->hfs_mp = mp; /* Make VFSTOHFS work */
1079 if (((unsigned int)vfs_flags(mp)) & MNT_UNKNOWNPERMISSIONS)
1092 vfs_setowner(mp, hfsmp->hfs_uid, hfsmp->hfs_gid); /* tell the VFS */
1108 if (((unsigned int)vfs_flags(mp)) & MNT_UNKNOWNPERMISSIONS) {
1111 vfs_setowner(mp, hfsmp->hfs_uid, hfsmp->hfs_gid); /* tell the VFS */
1140 if ((vfs_flags(mp) & MNT_ROOTFS)) {
1244 if (!(vfs_flags(mp) & MNT_ROOTFS) &&
1278 vfs_setflags(mp, (u_int64_t)((unsigned int)MNT_JOURNALED));
1318 if ( !(vfs_flags(mp) & MNT_ROOTFS)) {
1365 vfs_setflags(mp, (u_int64_t)((unsigned int)MNT_JOURNALED));
1404 if ( !(vfs_flags(mp) & MNT_ROOTFS)) {
1426 mp->mnt_vfsstat.f_fsid.val[0] = (long)dev;
1427 mp->mnt_vfsstat.f_fsid.val[1] = vfs_typenum(mp);
1428 vfs_setmaxsymlen(mp, 0);
1429 mp->mnt_vtable->vfc_threadsafe = TRUE;
1430 mp->mnt_vtable->vfc_vfsflags |= VFC_VFSNATIVEXATTR;
1432 mp->mnt_kern_flag |= MNTK_NAMED_STREAMS;
1436 mp->mnt_vtable->vfc_vfsflags |= VFC_VFSDIRLINKS;
1439 mp->mnt_vtable->vfc_vfsflags &= ~VFC_VFSREADDIR_EXTENDED;
1484 IOBSDIsMediaEjectable(mp->mnt_vfsstat.f_mntfromname)) {
1488 mp->mnt_vfsstat.f_mntfromname, mp->mnt_vfsstat.f_mntonname);
1521 vfs_setfsprivate(mp, NULL);
1533 hfs_start(__unused struct mount *mp, __unused int flags, __unused vfs_context_t context)
1543 hfs_unmount(struct mount *mp, int mntflags, vfs_context_t context)
1546 struct hfsmount *hfsmp = VFSTOHFS(mp);
1559 if ((retval = hfs_flushfiles(mp, flags, p)) && !force)
1684 (void) vflush(mp, NULLVP, FORCECLOSE);
1735 hfs_vfs_root(struct mount *mp, struct vnode **vpp, __unused vfs_context_t context)
1737 return hfs_vget(VFSTOHFS(mp), (cnid_t)kHFSRootFolderID, vpp, 1);
1746 hfs_quotactl(__unused struct mount *mp, __unused int cmds, __unused uid_t uid, __unused caddr_t datap, __unused vfs_context_t context)
1752 hfs_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t datap, vfs_context_t context)
1777 if (vfs_busy(mp, LK_NOWAIT))
1783 error = hfs_quotaon(p, mp, type, datap);
1787 error = hfs_quotaoff(p, mp, type);
1791 error = hfs_setquota(mp, uid, type, datap);
1795 error = hfs_setuse(mp, uid, type, datap);
1799 error = hfs_getquota(mp, uid, type, datap);
1803 error = hfs_qsync(mp);
1807 error = hfs_quotastat(mp, type, datap);
1814 vfs_unbusy(mp);
1830 hfs_statfs(struct mount *mp, register struct vfsstatfs *sbp, __unused vfs_context_t context)
1832 ExtendedVCB *vcb = VFSTOVCB(mp);
1833 struct hfsmount *hfsmp = VFSTOHFS(mp);
1840 sbp->f_iosize = (size_t)cluster_max_io_size(mp, 0);
1883 struct mount *mp = (struct mount *)arg;
1889 hfsmp = VFSTOHFS(mp);
1971 hfs_sync(struct mount *mp, int waitfor, vfs_context_t context)
1982 hfsmp = VFSTOHFS(mp);
2006 vnode_iterate(mp, 0, hfs_sync_callback, (void *)&args);
2023 if ((btvp==0) || (vnode_mount(btvp) != mp))
2059 hfs_qsync(mp);
2102 hfs_fhtovp(struct mount *mp, int fhlen, unsigned char *fhp, struct vnode **vpp, __unused vfs_context_t context)
2114 result = hfs_vget(VFSTOHFS(mp), ntohl(hfsfhp->hfsfid_cnid), &nvp, 0);
2316 printf("hfs: volume @ mp %p is already journaled!\n", vnode_mount(vp));
2470 struct mount *mp;
2481 mp = vfs_getvfs(&user_vc.vc_fsid);
2487 mp = vfs_getvfs(&vc.vc_fsid);
2489 if (mp == NULL) return (ENOENT);
2491 hfsmp = VFSTOHFS(mp);
2525 hfs_vfs_vget(struct mount *mp, ino64_t ino, struct vnode **vpp, __unused vfs_context_t context)
2531 hfsmp = VFSTOHFS(mp);
2735 hfs_flushfiles(struct mount *mp, int flags, struct proc *p)
2737 hfs_flushfiles(struct mount *mp, int flags, __unused struct proc *p)
2748 hfsmp = VFSTOHFS(mp);
2757 if (((unsigned int)vfs_flags(mp)) & MNT_QUOTA) {
2770 error = vflush(mp, skipvp, SKIPSYSTEM | SKIPSWAP | flags);
2774 error = vflush(mp, skipvp, SKIPSYSTEM | flags);
2777 if (((unsigned int)vfs_flags(mp)) & MNT_QUOTA) {
2797 hfs_quotaoff(p, mp, i);
2799 error = vflush(mp, NULLVP, SKIPSYSTEM | flags);
4843 hfs_vfs_getattr(struct mount *mp, struct vfs_attr *fsap, __unused vfs_context_t context)
4848 ExtendedVCB *vcb = VFSTOVCB(mp);
4849 struct hfsmount *hfsmp = VFSTOHFS(mp);
4858 VFSATTR_RETURN(fsap, f_iosize, (size_t)cluster_max_io_size(mp, 0));
4870 fsap->f_fsid.val[1] = vfs_typenum(mp);
5104 hfs_vfs_setattr(struct mount *mp, struct vfs_attr *fsap, __unused vfs_context_t context)
5112 if (!kauth_cred_issuser(cred) && (kauth_cred_getuid(cred) != vfs_statfs(mp)->f_owner))
5118 error = hfs_vfs_root(mp, &root_vp, context);
5162 struct mount *mp = NULL;
5178 MALLOC(mp, struct mount *, sizeof(struct mount), M_TEMP, M_WAITOK);
5179 bzero(mp, sizeof(struct mount));
5180 mount_lock_init(mp);
5185 retval = hfs_mountfs(devvp, mp, args, 1, context);
5189 if (mp) {
5190 mount_lock_destroy(mp);
5191 FREE(mp, M_TEMP);