mount.h (189696) | mount.h (191990) |
---|---|
1/*- 2 * Copyright (c) 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)mount.h 8.21 (Berkeley) 5/20/95 | 1/*- 2 * Copyright (c) 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)mount.h 8.21 (Berkeley) 5/20/95 |
30 * $FreeBSD: head/sys/sys/mount.h 189696 2009-03-11 14:13:47Z jhb $ | 30 * $FreeBSD: head/sys/sys/mount.h 191990 2009-05-11 15:33:26Z attilio $ |
31 */ 32 33#ifndef _SYS_MOUNT_H_ 34#define _SYS_MOUNT_H_ 35 36#include <sys/ucred.h> 37#include <sys/queue.h> 38#ifdef _KERNEL --- 510 unchanged lines hidden (view full) --- 549/* 550 * Operations supported on mounted filesystem. 551 */ 552struct mount_args; 553struct nameidata; 554struct sysctl_req; 555struct mntarg; 556 | 31 */ 32 33#ifndef _SYS_MOUNT_H_ 34#define _SYS_MOUNT_H_ 35 36#include <sys/ucred.h> 37#include <sys/queue.h> 38#ifdef _KERNEL --- 510 unchanged lines hidden (view full) --- 549/* 550 * Operations supported on mounted filesystem. 551 */ 552struct mount_args; 553struct nameidata; 554struct sysctl_req; 555struct mntarg; 556 |
557typedef int vfs_cmount_t(struct mntarg *ma, void *data, int flags, struct thread *td); 558typedef int vfs_unmount_t(struct mount *mp, int mntflags, struct thread *td); 559typedef int vfs_root_t(struct mount *mp, int flags, struct vnode **vpp, 560 struct thread *td); 561typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid, 562 void *arg, struct thread *td); 563typedef int vfs_statfs_t(struct mount *mp, struct statfs *sbp, 564 struct thread *td); 565typedef int vfs_sync_t(struct mount *mp, int waitfor, struct thread *td); | 557typedef int vfs_cmount_t(struct mntarg *ma, void *data, int flags); 558typedef int vfs_unmount_t(struct mount *mp, int mntflags); 559typedef int vfs_root_t(struct mount *mp, int flags, struct vnode **vpp); 560typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid, void *arg); 561typedef int vfs_statfs_t(struct mount *mp, struct statfs *sbp); 562typedef int vfs_sync_t(struct mount *mp, int waitfor); |
566typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags, 567 struct vnode **vpp); 568typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, struct vnode **vpp); 569typedef int vfs_checkexp_t(struct mount *mp, struct sockaddr *nam, 570 int *extflagsp, struct ucred **credanonp, 571 int *numsecflavors, int **secflavors); 572typedef int vfs_init_t(struct vfsconf *); 573typedef int vfs_uninit_t(struct vfsconf *); 574typedef int vfs_extattrctl_t(struct mount *mp, int cmd, 575 struct vnode *filename_vp, int attrnamespace, | 563typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags, 564 struct vnode **vpp); 565typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, struct vnode **vpp); 566typedef int vfs_checkexp_t(struct mount *mp, struct sockaddr *nam, 567 int *extflagsp, struct ucred **credanonp, 568 int *numsecflavors, int **secflavors); 569typedef int vfs_init_t(struct vfsconf *); 570typedef int vfs_uninit_t(struct vfsconf *); 571typedef int vfs_extattrctl_t(struct mount *mp, int cmd, 572 struct vnode *filename_vp, int attrnamespace, |
576 const char *attrname, struct thread *td); 577typedef int vfs_mount_t(struct mount *mp, struct thread *td); | 573 const char *attrname); 574typedef int vfs_mount_t(struct mount *mp); |
578typedef int vfs_sysctl_t(struct mount *mp, fsctlop_t op, 579 struct sysctl_req *req); 580typedef void vfs_susp_clean_t(struct mount *mp); 581 582struct vfsops { 583 vfs_mount_t *vfs_mount; 584 vfs_cmount_t *vfs_cmount; 585 vfs_unmount_t *vfs_unmount; --- 8 unchanged lines hidden (view full) --- 594 vfs_uninit_t *vfs_uninit; 595 vfs_extattrctl_t *vfs_extattrctl; 596 vfs_sysctl_t *vfs_sysctl; 597 vfs_susp_clean_t *vfs_susp_clean; 598}; 599 600vfs_statfs_t __vfs_statfs; 601 | 575typedef int vfs_sysctl_t(struct mount *mp, fsctlop_t op, 576 struct sysctl_req *req); 577typedef void vfs_susp_clean_t(struct mount *mp); 578 579struct vfsops { 580 vfs_mount_t *vfs_mount; 581 vfs_cmount_t *vfs_cmount; 582 vfs_unmount_t *vfs_unmount; --- 8 unchanged lines hidden (view full) --- 591 vfs_uninit_t *vfs_uninit; 592 vfs_extattrctl_t *vfs_extattrctl; 593 vfs_sysctl_t *vfs_sysctl; 594 vfs_susp_clean_t *vfs_susp_clean; 595}; 596 597vfs_statfs_t __vfs_statfs; 598 |
602#define VFS_MOUNT(MP, P) (*(MP)->mnt_op->vfs_mount)(MP, P) 603#define VFS_UNMOUNT(MP, FORCE, P) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE, P) 604#define VFS_ROOT(MP, FLAGS, VPP, P) \ 605 (*(MP)->mnt_op->vfs_root)(MP, FLAGS, VPP, P) 606#define VFS_QUOTACTL(MP,C,U,A,P) (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, P) 607#define VFS_STATFS(MP, SBP, P) __vfs_statfs((MP), (SBP), (P)) 608#define VFS_SYNC(MP, WAIT, P) (*(MP)->mnt_op->vfs_sync)(MP, WAIT, P) | 599#define VFS_MOUNT(MP) (*(MP)->mnt_op->vfs_mount)(MP) 600#define VFS_UNMOUNT(MP, FORCE) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE) 601#define VFS_ROOT(MP, FLAGS, VPP) \ 602 (*(MP)->mnt_op->vfs_root)(MP, FLAGS, VPP) 603#define VFS_QUOTACTL(MP, C, U, A) \ 604 (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A) 605#define VFS_STATFS(MP, SBP) __vfs_statfs((MP), (SBP)) 606#define VFS_SYNC(MP, WAIT) (*(MP)->mnt_op->vfs_sync)(MP, WAIT) |
609#define VFS_VGET(MP, INO, FLAGS, VPP) \ 610 (*(MP)->mnt_op->vfs_vget)(MP, INO, FLAGS, VPP) 611#define VFS_FHTOVP(MP, FIDP, VPP) \ 612 (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, VPP) 613#define VFS_CHECKEXP(MP, NAM, EXFLG, CRED, NUMSEC, SEC) \ 614 (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED, NUMSEC, SEC) | 607#define VFS_VGET(MP, INO, FLAGS, VPP) \ 608 (*(MP)->mnt_op->vfs_vget)(MP, INO, FLAGS, VPP) 609#define VFS_FHTOVP(MP, FIDP, VPP) \ 610 (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, VPP) 611#define VFS_CHECKEXP(MP, NAM, EXFLG, CRED, NUMSEC, SEC) \ 612 (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED, NUMSEC, SEC) |
615#define VFS_EXTATTRCTL(MP, C, FN, NS, N, P) \ 616 (*(MP)->mnt_op->vfs_extattrctl)(MP, C, FN, NS, N, P) | 613#define VFS_EXTATTRCTL(MP, C, FN, NS, N) \ 614 (*(MP)->mnt_op->vfs_extattrctl)(MP, C, FN, NS, N) |
617#define VFS_SYSCTL(MP, OP, REQ) \ 618 (*(MP)->mnt_op->vfs_sysctl)(MP, OP, REQ) 619#define VFS_SUSP_CLEAN(MP) \ 620 ({if (*(MP)->mnt_op->vfs_susp_clean != NULL) \ 621 (*(MP)->mnt_op->vfs_susp_clean)(MP); }) 622 623extern int mpsafe_vfs; 624 --- 174 unchanged lines hidden --- | 615#define VFS_SYSCTL(MP, OP, REQ) \ 616 (*(MP)->mnt_op->vfs_sysctl)(MP, OP, REQ) 617#define VFS_SUSP_CLEAN(MP) \ 618 ({if (*(MP)->mnt_op->vfs_susp_clean != NULL) \ 619 (*(MP)->mnt_op->vfs_susp_clean)(MP); }) 620 621extern int mpsafe_vfs; 622 --- 174 unchanged lines hidden --- |