Deleted Added
full compact
udf_vfsops.c (132023) udf_vfsops.c (132902)
1/*-
2 * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/fs/udf/udf_vfsops.c 132023 2004-07-12 08:14:09Z alfred $
26 * $FreeBSD: head/sys/fs/udf/udf_vfsops.c 132902 2004-07-30 22:08:52Z phk $
27 */
28
29/* udf_vfsops.c */
30/* Implement the VFS side of things */
31
32/*
33 * Ok, here's how it goes. The UDF specs are pretty clear on how each data
34 * structure is made up, but not very clear on how they relate to each other.

--- 68 unchanged lines hidden (view full) ---

103
104/* Zones */
105uma_zone_t udf_zone_trans = NULL;
106uma_zone_t udf_zone_node = NULL;
107uma_zone_t udf_zone_ds = NULL;
108
109static vfs_init_t udf_init;
110static vfs_uninit_t udf_uninit;
27 */
28
29/* udf_vfsops.c */
30/* Implement the VFS side of things */
31
32/*
33 * Ok, here's how it goes. The UDF specs are pretty clear on how each data
34 * structure is made up, but not very clear on how they relate to each other.

--- 68 unchanged lines hidden (view full) ---

103
104/* Zones */
105uma_zone_t udf_zone_trans = NULL;
106uma_zone_t udf_zone_node = NULL;
107uma_zone_t udf_zone_ds = NULL;
108
109static vfs_init_t udf_init;
110static vfs_uninit_t udf_uninit;
111static vfs_nmount_t udf_mount;
111static vfs_mount_t udf_mount;
112static vfs_root_t udf_root;
113static vfs_statfs_t udf_statfs;
114static vfs_unmount_t udf_unmount;
115static vfs_fhtovp_t udf_fhtovp;
116static vfs_vptofh_t udf_vptofh;
117
118static int udf_find_partmaps(struct udf_mnt *, struct logvol_desc *);
119
120static struct vfsops udf_vfsops = {
121 .vfs_fhtovp = udf_fhtovp,
122 .vfs_init = udf_init,
112static vfs_root_t udf_root;
113static vfs_statfs_t udf_statfs;
114static vfs_unmount_t udf_unmount;
115static vfs_fhtovp_t udf_fhtovp;
116static vfs_vptofh_t udf_vptofh;
117
118static int udf_find_partmaps(struct udf_mnt *, struct logvol_desc *);
119
120static struct vfsops udf_vfsops = {
121 .vfs_fhtovp = udf_fhtovp,
122 .vfs_init = udf_init,
123 .vfs_nmount = udf_mount,
123 .vfs_mount = udf_mount,
124 .vfs_root = udf_root,
125 .vfs_statfs = udf_statfs,
126 .vfs_uninit = udf_uninit,
127 .vfs_unmount = udf_unmount,
128 .vfs_vget = udf_vget,
129 .vfs_vptofh = udf_vptofh,
130};
131VFS_SET(udf_vfsops, udf, VFCF_READONLY);

--- 47 unchanged lines hidden (view full) ---

179 uma_zdestroy(udf_zone_ds);
180 udf_zone_ds = NULL;
181 }
182
183 return (0);
184}
185
186static int
124 .vfs_root = udf_root,
125 .vfs_statfs = udf_statfs,
126 .vfs_uninit = udf_uninit,
127 .vfs_unmount = udf_unmount,
128 .vfs_vget = udf_vget,
129 .vfs_vptofh = udf_vptofh,
130};
131VFS_SET(udf_vfsops, udf, VFCF_READONLY);

--- 47 unchanged lines hidden (view full) ---

179 uma_zdestroy(udf_zone_ds);
180 udf_zone_ds = NULL;
181 }
182
183 return (0);
184}
185
186static int
187udf_mount(struct mount *mp, struct nameidata *ndp, struct thread *td)
187udf_mount(struct mount *mp, struct thread *td)
188{
189 struct vnode *devvp; /* vnode of the mount device */
190 struct udf_mnt *imp = 0;
191 struct export_args *export;
192 struct vfsoptlist *opts;
193 char *fspec, *cs_disk, *cs_local;
194 size_t size;
195 int error, len, *udf_flags;
188{
189 struct vnode *devvp; /* vnode of the mount device */
190 struct udf_mnt *imp = 0;
191 struct export_args *export;
192 struct vfsoptlist *opts;
193 char *fspec, *cs_disk, *cs_local;
194 size_t size;
195 int error, len, *udf_flags;
196 struct nameidata nd, *ndp = &nd;
196
197 opts = mp->mnt_optnew;
198
199 if ((mp->mnt_flag & MNT_RDONLY) == 0)
200 return (EROFS);
201
202 /*
203 * No root filesystem support. Probably not a big deal, since the

--- 605 unchanged lines hidden ---
197
198 opts = mp->mnt_optnew;
199
200 if ((mp->mnt_flag & MNT_RDONLY) == 0)
201 return (EROFS);
202
203 /*
204 * No root filesystem support. Probably not a big deal, since the

--- 605 unchanged lines hidden ---