udf_vnops.c (6fde64c778e3d740d65c6a1e3db36df6cdd8ee68) | udf_vnops.c (aec0fb7b40e4cf877bea663f2d86dd07c3524fe8) |
---|---|
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 --- 54 unchanged lines hidden (view full) --- 63static vop_readlink_t udf_readlink; 64static vop_strategy_t udf_strategy; 65static vop_bmap_t udf_bmap; 66static vop_cachedlookup_t udf_lookup; 67static vop_reclaim_t udf_reclaim; 68static int udf_readatoffset(struct udf_node *, int *, int, struct buf **, uint8_t **); 69static int udf_bmap_internal(struct udf_node *, uint32_t, daddr_t *, uint32_t *); 70 | 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 --- 54 unchanged lines hidden (view full) --- 63static vop_readlink_t udf_readlink; 64static vop_strategy_t udf_strategy; 65static vop_bmap_t udf_bmap; 66static vop_cachedlookup_t udf_lookup; 67static vop_reclaim_t udf_reclaim; 68static int udf_readatoffset(struct udf_node *, int *, int, struct buf **, uint8_t **); 69static int udf_bmap_internal(struct udf_node *, uint32_t, daddr_t *, uint32_t *); 70 |
71vop_t **udf_vnodeop_p; 72static struct vnodeopv_entry_desc udf_vnodeop_entries[] = { 73 { &vop_default_desc, (vop_t *) vop_defaultop }, 74 { &vop_access_desc, (vop_t *) udf_access }, 75 { &vop_bmap_desc, (vop_t *) udf_bmap }, 76 { &vop_cachedlookup_desc, (vop_t *) udf_lookup }, 77 { &vop_getattr_desc, (vop_t *) udf_getattr }, 78 { &vop_ioctl_desc, (vop_t *) udf_ioctl }, 79 { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, 80 { &vop_pathconf_desc, (vop_t *) udf_pathconf }, 81 { &vop_read_desc, (vop_t *) udf_read }, 82 { &vop_readdir_desc, (vop_t *) udf_readdir }, 83 { &vop_readlink_desc, (vop_t *) udf_readlink }, 84 { &vop_reclaim_desc, (vop_t *) udf_reclaim }, 85 { &vop_strategy_desc, (vop_t *) udf_strategy }, 86 { NULL, NULL } | 71static struct vop_vector udf_vnodeops = { 72 .vop_default = &default_vnodeops, 73 .vop_access = udf_access, 74 .vop_bmap = udf_bmap, 75 .vop_cachedlookup = udf_lookup, 76 .vop_getattr = udf_getattr, 77 .vop_ioctl = udf_ioctl, 78 .vop_lookup = vfs_cache_lookup, 79 .vop_pathconf = udf_pathconf, 80 .vop_read = udf_read, 81 .vop_readdir = udf_readdir, 82 .vop_readlink = udf_readlink, 83 .vop_reclaim = udf_reclaim, 84 .vop_strategy = udf_strategy, |
87}; | 85}; |
88static struct vnodeopv_desc udf_vnodeop_opv_desc = 89 { &udf_vnodeop_p, udf_vnodeop_entries }; 90VNODEOP_SET(udf_vnodeop_opv_desc); | |
91 92MALLOC_DEFINE(M_UDFFID, "UDF FID", "UDF FileId structure"); 93MALLOC_DEFINE(M_UDFDS, "UDF DS", "UDF Dirstream structure"); 94 95#define UDF_INVALID_BMAP -1 96 97/* Look up a udf_node based on the ino_t passed in and return it's vnode */ 98int --- 67 unchanged lines hidden (view full) --- 166} 167 168int 169udf_allocv(struct mount *mp, struct vnode **vpp, struct thread *td) 170{ 171 int error; 172 struct vnode *vp; 173 | 86 87MALLOC_DEFINE(M_UDFFID, "UDF FID", "UDF FileId structure"); 88MALLOC_DEFINE(M_UDFDS, "UDF DS", "UDF Dirstream structure"); 89 90#define UDF_INVALID_BMAP -1 91 92/* Look up a udf_node based on the ino_t passed in and return it's vnode */ 93int --- 67 unchanged lines hidden (view full) --- 161} 162 163int 164udf_allocv(struct mount *mp, struct vnode **vpp, struct thread *td) 165{ 166 int error; 167 struct vnode *vp; 168 |
174 error = getnewvnode("udf", mp, udf_vnodeop_p, &vp); | 169 error = getnewvnode("udf", mp, &udf_vnodeops, &vp); |
175 if (error) { 176 printf("udf_allocv: failed to allocate new vnode\n"); 177 return (error); 178 } 179 180 *vpp = vp; 181 return (0); 182} --- 1042 unchanged lines hidden --- | 170 if (error) { 171 printf("udf_allocv: failed to allocate new vnode\n"); 172 return (error); 173 } 174 175 *vpp = vp; 176 return (0); 177} --- 1042 unchanged lines hidden --- |