Deleted Added
full compact
udf_vnops.c (166030) udf_vnops.c (166774)
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_vnops.c 166030 2007-01-15 18:45:36Z pav $
26 * $FreeBSD: head/sys/fs/udf/udf_vnops.c 166774 2007-02-15 22:08:35Z pjd $
27 */
28
29/* udf_vnops.c */
30/* Take care of the vnode side of things */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/namei.h>

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

62static vop_pathconf_t udf_pathconf;
63static vop_read_t udf_read;
64static vop_readdir_t udf_readdir;
65static vop_readlink_t udf_readlink;
66static vop_strategy_t udf_strategy;
67static vop_bmap_t udf_bmap;
68static vop_cachedlookup_t udf_lookup;
69static vop_reclaim_t udf_reclaim;
27 */
28
29/* udf_vnops.c */
30/* Take care of the vnode side of things */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/namei.h>

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

62static vop_pathconf_t udf_pathconf;
63static vop_read_t udf_read;
64static vop_readdir_t udf_readdir;
65static vop_readlink_t udf_readlink;
66static vop_strategy_t udf_strategy;
67static vop_bmap_t udf_bmap;
68static vop_cachedlookup_t udf_lookup;
69static vop_reclaim_t udf_reclaim;
70static vop_vptofh_t udf_vptofh;
70static int udf_readatoffset(struct udf_node *node, int *size, off_t offset,
71 struct buf **bp, uint8_t **data);
72static int udf_bmap_internal(struct udf_node *node, off_t offset,
73 daddr_t *sector, uint32_t *max_size);
74
75static struct vop_vector udf_vnodeops = {
76 .vop_default = &default_vnodeops,
77

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

83 .vop_lookup = vfs_cache_lookup,
84 .vop_open = udf_open,
85 .vop_pathconf = udf_pathconf,
86 .vop_read = udf_read,
87 .vop_readdir = udf_readdir,
88 .vop_readlink = udf_readlink,
89 .vop_reclaim = udf_reclaim,
90 .vop_strategy = udf_strategy,
71static int udf_readatoffset(struct udf_node *node, int *size, off_t offset,
72 struct buf **bp, uint8_t **data);
73static int udf_bmap_internal(struct udf_node *node, off_t offset,
74 daddr_t *sector, uint32_t *max_size);
75
76static struct vop_vector udf_vnodeops = {
77 .vop_default = &default_vnodeops,
78

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

84 .vop_lookup = vfs_cache_lookup,
85 .vop_open = udf_open,
86 .vop_pathconf = udf_pathconf,
87 .vop_read = udf_read,
88 .vop_readdir = udf_readdir,
89 .vop_readlink = udf_readlink,
90 .vop_reclaim = udf_reclaim,
91 .vop_strategy = udf_strategy,
92 .vop_vptofh = udf_vptofh,
91};
92
93MALLOC_DEFINE(M_UDFFID, "udf_fid", "UDF FileId structure");
94MALLOC_DEFINE(M_UDFDS, "udf_ds", "UDF Dirstream structure");
95
96#define UDF_INVALID_BMAP -1
97
98int

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

1017 FREE(unode->fentry, M_UDFFENTRY);
1018 uma_zfree(udf_zone_node, unode);
1019 vp->v_data = NULL;
1020 }
1021
1022 return (0);
1023}
1024
93};
94
95MALLOC_DEFINE(M_UDFFID, "udf_fid", "UDF FileId structure");
96MALLOC_DEFINE(M_UDFDS, "udf_ds", "UDF Dirstream structure");
97
98#define UDF_INVALID_BMAP -1
99
100int

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

1019 FREE(unode->fentry, M_UDFFENTRY);
1020 uma_zfree(udf_zone_node, unode);
1021 vp->v_data = NULL;
1022 }
1023
1024 return (0);
1025}
1026
1027static int
1028udf_vptofh(struct vop_vptofh_args *a)
1029{
1030 struct udf_node *node;
1031 struct ifid *ifhp;
1032
1033 node = VTON(a->a_vp);
1034 ifhp = (struct ifid *)a->a_fhp;
1035 ifhp->ifid_len = sizeof(struct ifid);
1036 ifhp->ifid_ino = node->hash_id;
1037
1038 return (0);
1039}
1040
1025/*
1026 * Read the block and then set the data pointer to correspond with the
1027 * offset passed in. Only read in at most 'size' bytes, and then set 'size'
1028 * to the number of bytes pointed to. If 'size' is zero, try to read in a
1029 * whole extent.
1030 *
1031 * Note that *bp may be assigned error or not.
1032 *

--- 168 unchanged lines hidden ---
1041/*
1042 * Read the block and then set the data pointer to correspond with the
1043 * offset passed in. Only read in at most 'size' bytes, and then set 'size'
1044 * to the number of bytes pointed to. If 'size' is zero, try to read in a
1045 * whole extent.
1046 *
1047 * Note that *bp may be assigned error or not.
1048 *

--- 168 unchanged lines hidden ---