diff options
-rw-r--r-- | sys/isofs/udf/udf.h | 38 | ||||
-rw-r--r-- | sys/isofs/udf/udf_extern.h | 6 | ||||
-rw-r--r-- | sys/isofs/udf/udf_subr.c | 10 | ||||
-rw-r--r-- | sys/isofs/udf/udf_vfsops.c | 46 | ||||
-rw-r--r-- | sys/isofs/udf/udf_vnops.c | 145 |
5 files changed, 123 insertions, 122 deletions
diff --git a/sys/isofs/udf/udf.h b/sys/isofs/udf/udf.h index b1165da7114..83b6582d4be 100644 --- a/sys/isofs/udf/udf.h +++ b/sys/isofs/udf/udf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: udf.h,v 1.6 2006/07/08 20:53:31 pedro Exp $ */ +/* $OpenBSD: udf.h,v 1.7 2006/07/08 23:11:59 pedro Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -34,23 +34,23 @@ #define UDF_HASHTBLSIZE 100 -struct udf_node { - LIST_ENTRY(udf_node) le; - struct vnode *i_vnode; - struct vnode *i_devvp; - struct udf_mnt *udfmp; - struct lock i_lock; - dev_t i_dev; - ino_t hash_id; +struct unode { + LIST_ENTRY(unode) u_le; + struct vnode *u_vnode; + struct vnode *u_devvp; + struct udf_mnt *u_ump; + struct lock u_lock; + dev_t u_dev; + ino_t u_ino; union { - long diroff; - long vatlen; + long u_diroff; + long u_vatlen; } un_u; - struct file_entry *fentry; + struct file_entry *u_fentry; }; -#define diroff un_u.diroff -#define vatlen un_u.vatlen +#define u_diroff un_u.u_diroff +#define u_vatlen un_u.u_vatlen struct udf_mnt { int im_flags; @@ -65,7 +65,7 @@ struct udf_mnt { struct vnode *im_vat; struct vnode *root_vp; struct long_ad root_icb; - LIST_HEAD(udf_hash_lh, udf_node) *hashtbl; + LIST_HEAD(udf_hash_lh, unode) *hashtbl; u_long hashsz; struct mutex hash_mtx; int p_sectors; @@ -77,7 +77,7 @@ struct udf_mnt { #define UDF_MNT_USES_VAT 0x02 /* Indicates a VAT must be used */ struct udf_dirstream { - struct udf_node *node; + struct unode *node; struct udf_mnt *udfmp; struct buf *bp; uint8_t *data; @@ -92,7 +92,7 @@ struct udf_dirstream { }; #define VFSTOUDFFS(mp) ((struct udf_mnt *)((mp)->mnt_data)) -#define VTOU(vp) ((struct udf_node *)((vp)->v_data)) +#define VTOU(vp) ((struct unode *)((vp)->v_data)) /* * The block layer refers to things in terms of 512 byte blocks by default. @@ -140,8 +140,8 @@ udf_getid(struct long_ad *icb) int udf_allocv(struct mount *, struct vnode **, struct proc *); int udf_hashlookup(struct udf_mnt *, ino_t, int, struct vnode **); -int udf_hashins(struct udf_node *); -int udf_hashrem(struct udf_node *); +int udf_hashins(struct unode *); +int udf_hashrem(struct unode *); int udf_checktag(struct desc_tag *, uint16_t); typedef uint16_t unicode_t; diff --git a/sys/isofs/udf/udf_extern.h b/sys/isofs/udf/udf_extern.h index 72db7d4615a..e35369519a6 100644 --- a/sys/isofs/udf/udf_extern.h +++ b/sys/isofs/udf/udf_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_extern.h,v 1.4 2006/07/05 17:57:50 pedro Exp $ */ +/* $OpenBSD: udf_extern.h,v 1.5 2006/07/08 23:11:59 pedro Exp $ */ /* * Written by Pedro Martelletto <pedro@openbsd.org> in February 2005. @@ -51,14 +51,14 @@ int udf_unlock(void *v); int udf_islocked(void *v); int udf_print(void *v); int udf_transname(char *, char *, int, struct udf_mnt *); -int udf_readatoffset(struct udf_node *, int *, off_t, struct buf **, +int udf_readatoffset(struct unode *, int *, off_t, struct buf **, uint8_t **); /* * Memory pools. */ extern struct pool udf_trans_pool; -extern struct pool udf_node_pool; +extern struct pool unode_pool; extern struct pool udf_ds_pool; /* diff --git a/sys/isofs/udf/udf_subr.c b/sys/isofs/udf/udf_subr.c index 18c38ce3232..c6755d6b7bd 100644 --- a/sys/isofs/udf/udf_subr.c +++ b/sys/isofs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_subr.c,v 1.6 2006/07/08 20:53:31 pedro Exp $ */ +/* $OpenBSD: udf_subr.c,v 1.7 2006/07/08 23:11:59 pedro Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -186,7 +186,7 @@ int udf_vat_get(struct udf_mnt *ump) { struct vnode *vp; - struct udf_node *unp; + struct unode *unp; int error; error = udf_vget(ump->im_mountp, ump->part_len - 3, &vp); @@ -194,7 +194,7 @@ udf_vat_get(struct udf_mnt *ump) return (error); unp = VTOU(vp); - unp->vatlen = (letoh64(unp->fentry->inf_len) - 36) >> 2; + unp->u_vatlen = (letoh64(unp->u_fentry->inf_len) - 36) >> 2; ump->im_vat = vp; ump->im_flags &= ~UDF_MNT_FIND_VAT; @@ -216,7 +216,7 @@ udf_vat_map(struct udf_mnt *ump, uint32_t *sector) } /* Sanity check the given sector */ - if (*sector >= VTOU(ump->im_vat)->vatlen) + if (*sector >= VTOU(ump->im_vat)->u_vatlen) return (EINVAL); return (udf_vat_read(ump, sector)); @@ -226,7 +226,7 @@ udf_vat_map(struct udf_mnt *ump, uint32_t *sector) int udf_vat_read(struct udf_mnt *ump, uint32_t *sector) { - struct udf_node *unp; + struct unode *unp; struct buf *bp; uint8_t *data; int error, size; diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c index 00431d7c9d7..fb4e6e4d2d0 100644 --- a/sys/isofs/udf/udf_vfsops.c +++ b/sys/isofs/udf/udf_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vfsops.c,v 1.15 2006/07/08 20:53:31 pedro Exp $ */ +/* $OpenBSD: udf_vfsops.c,v 1.16 2006/07/08 23:11:59 pedro Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -73,7 +73,7 @@ #include <isofs/udf/udf_extern.h> struct pool udf_trans_pool; -struct pool udf_node_pool; +struct pool unode_pool; struct pool udf_ds_pool; int udf_find_partmaps(struct udf_mnt *, struct logvol_desc *); @@ -103,7 +103,7 @@ udf_init(struct vfsconf *foo) { pool_init(&udf_trans_pool, MAXNAMLEN * sizeof(unicode_t), 0, 0, 0, "udftrpl", &pool_allocator_nointr); - pool_init(&udf_node_pool, sizeof(struct udf_node), 0, 0, 0, + pool_init(&unode_pool, sizeof(struct unode), 0, 0, 0, "udfndpl", &pool_allocator_nointr); pool_init(&udf_ds_pool, sizeof(struct udf_dirstream), 0, 0, 0, "udfdspl", &pool_allocator_nointr); @@ -508,7 +508,7 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp) struct udf_mnt *udfmp; struct proc *p; struct vnode *vp; - struct udf_node *unode; + struct unode *unode; struct file_entry *fe; int error, sector, size; @@ -527,8 +527,8 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp) * Allocate memory and check the tag id's before grabbing a new * vnode, since it's hard to roll back if there is a problem. */ - unode = pool_get(&udf_node_pool, PR_WAITOK); - bzero(unode, sizeof(struct udf_node)); + unode = pool_get(&unode_pool, PR_WAITOK); + bzero(unode, sizeof(struct unode)); /* * Copy in the file entry. Per the spec, the size can only be 1 block. @@ -538,7 +538,7 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp) udf_vat_map(udfmp, §or); if ((error = RDSECTOR(devvp, sector, udfmp->bsize, &bp)) != 0) { printf("Cannot read sector %d\n", sector); - pool_put(&udf_node_pool, unode); + pool_put(&unode_pool, unode); if (bp != NULL) brelse(bp); return (error); @@ -547,47 +547,47 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp) fe = (struct file_entry *)bp->b_data; if (udf_checktag(&fe->tag, TAGID_FENTRY)) { printf("Invalid file entry!\n"); - pool_put(&udf_node_pool, unode); + pool_put(&unode_pool, unode); brelse(bp); return (ENOMEM); } size = UDF_FENTRY_SIZE + letoh32(fe->l_ea) + letoh32(fe->l_ad); - unode->fentry = malloc(size, M_UDFFENTRY, M_NOWAIT); - if (unode->fentry == NULL) { - pool_put(&udf_node_pool, unode); + unode->u_fentry = malloc(size, M_UDFFENTRY, M_NOWAIT); + if (unode->u_fentry == NULL) { + pool_put(&unode_pool, unode); brelse(bp); return (ENOMEM); /* Cannot allocate file entry block */ } - bcopy(bp->b_data, unode->fentry, size); + bcopy(bp->b_data, unode->u_fentry, size); brelse(bp); bp = NULL; if ((error = udf_allocv(mp, &vp, p))) { - free(unode->fentry, M_UDFFENTRY); - pool_put(&udf_node_pool, unode); + free(unode->u_fentry, M_UDFFENTRY); + pool_put(&unode_pool, unode); return (error); /* Error from udf_allocv() */ } - unode->i_vnode = vp; - unode->hash_id = ino; - unode->i_devvp = udfmp->im_devvp; - unode->i_dev = udfmp->im_dev; - unode->udfmp = udfmp; + unode->u_vnode = vp; + unode->u_ino = ino; + unode->u_devvp = udfmp->im_devvp; + unode->u_dev = udfmp->im_dev; + unode->u_ump = udfmp; vp->v_data = unode; VREF(udfmp->im_devvp); - lockinit(&unode->i_lock, PINOD, "unode", 0, 0); + lockinit(&unode->u_lock, PINOD, "unode", 0, 0); /* * udf_hashins() will lock the vnode for us. */ udf_hashins(unode); - switch (unode->fentry->icbtag.file_type) { + switch (unode->u_fentry->icbtag.file_type) { default: vp->v_type = VBAD; break; @@ -651,13 +651,13 @@ udf_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) int udf_vptofh(struct vnode *vp, struct fid *fhp) { - struct udf_node *node; + struct unode *node; struct ifid *ifhp; node = VTOU(vp); ifhp = (struct ifid *)fhp; ifhp->ifid_len = sizeof(struct ifid); - ifhp->ifid_ino = node->hash_id; + ifhp->ifid_ino = node->u_ino; return (0); } diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index 4e28e806fb4..d6f38b6939e 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.16 2006/07/08 20:53:31 pedro Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.17 2006/07/08 23:11:59 pedro Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -55,7 +55,7 @@ #include <isofs/udf/udf.h> #include <isofs/udf/udf_extern.h> -int udf_bmap_internal(struct udf_node *, off_t, daddr_t *, uint32_t *); +int udf_bmap_internal(struct unode *, off_t, daddr_t *, uint32_t *); int (**udf_vnodeop_p)(void *); struct vnodeopv_entry_desc udf_vnodeop_entries[] = { @@ -84,11 +84,11 @@ struct vnodeopv_desc udf_vnodeop_opv_desc = #define UDF_INVALID_BMAP -1 -/* Look up a udf_node based on the ino_t passed in and return it's vnode */ +/* Look up a unode based on the ino_t passed in and return it's vnode */ int udf_hashlookup(struct udf_mnt *udfmp, ino_t id, int flags, struct vnode **vpp) { - struct udf_node *node; + struct unode *node; struct udf_hash_lh *lh; struct proc *p = curproc; int error; @@ -103,15 +103,15 @@ loop: return (ENOENT); } - LIST_FOREACH(node, lh, le) { - if (node->hash_id == id) { + LIST_FOREACH(node, lh, u_le) { + if (node->u_ino == id) { mtx_leave(&udfmp->hash_mtx); - error = vget(node->i_vnode, flags | LK_INTERLOCK, p); + error = vget(node->u_vnode, flags | LK_INTERLOCK, p); if (error == ENOENT) goto loop; if (error) return (error); - *vpp = node->i_vnode; + *vpp = node->u_vnode; return (0); } } @@ -122,38 +122,38 @@ loop: } int -udf_hashins(struct udf_node *node) +udf_hashins(struct unode *node) { struct udf_mnt *udfmp; struct udf_hash_lh *lh; struct proc *p = curproc; - udfmp = node->udfmp; + udfmp = node->u_ump; - vn_lock(node->i_vnode, LK_EXCLUSIVE | LK_RETRY, p); + vn_lock(node->u_vnode, LK_EXCLUSIVE | LK_RETRY, p); mtx_enter(&udfmp->hash_mtx); - lh = &udfmp->hashtbl[node->hash_id & udfmp->hashsz]; + lh = &udfmp->hashtbl[node->u_ino & udfmp->hashsz]; if (lh == NULL) LIST_INIT(lh); - LIST_INSERT_HEAD(lh, node, le); + LIST_INSERT_HEAD(lh, node, u_le); mtx_leave(&udfmp->hash_mtx); return (0); } int -udf_hashrem(struct udf_node *node) +udf_hashrem(struct unode *node) { struct udf_mnt *udfmp; struct udf_hash_lh *lh; - udfmp = node->udfmp; + udfmp = node->u_ump; mtx_enter(&udfmp->hash_mtx); - lh = &udfmp->hashtbl[node->hash_id & udfmp->hashsz]; + lh = &udfmp->hashtbl[node->u_ino & udfmp->hashsz]; if (lh == NULL) - panic("hash entry is NULL, node->hash_id= %d", node->hash_id); - LIST_REMOVE(node, le); + panic("hash entry is NULL, node->u_ino= %d", node->u_ino); + LIST_REMOVE(node, u_le); mtx_leave(&udfmp->hash_mtx); return (0); @@ -177,14 +177,14 @@ udf_allocv(struct mount *mp, struct vnode **vpp, struct proc *p) /* Convert file entry permission (5 bits per owner/group/user) to a mode_t */ static mode_t -udf_permtomode(struct udf_node *node) +udf_permtomode(struct unode *node) { uint32_t perm; uint16_t flags; mode_t mode; - perm = letoh32(node->fentry->perm); - flags = letoh16(node->fentry->icbtag.flags); + perm = letoh32(node->u_fentry->perm); + flags = letoh16(node->u_fentry->icbtag.flags); mode = perm & UDF_FENTRY_PERM_USER_MASK; mode |= ((perm & UDF_FENTRY_PERM_GRP_MASK) >> 2); @@ -206,7 +206,7 @@ udf_access(void *v) struct proc *a_p; } */ *ap = v; struct vnode *vp; - struct udf_node *node; + struct unode *node; mode_t a_mode, mode; vp = ap->a_vp; @@ -227,7 +227,7 @@ udf_access(void *v) mode = udf_permtomode(node); - return (vaccess(mode, node->fentry->uid, node->fentry->gid, a_mode, + return (vaccess(mode, node->u_fentry->uid, node->u_fentry->gid, a_mode, ap->a_cred)); } @@ -318,7 +318,7 @@ udf_getattr(void *v) struct proc *a_p; } */ *ap = v; struct vnode *vp; - struct udf_node *node; + struct unode *node; struct vattr *vap; struct file_entry *fentry; struct timespec ts; @@ -328,10 +328,10 @@ udf_getattr(void *v) vp = ap->a_vp; vap = ap->a_vap; node = VTOU(vp); - fentry = node->fentry; + fentry = node->u_fentry; - vap->va_fsid = node->i_dev; - vap->va_fileid = node->hash_id; + vap->va_fsid = node->u_dev; + vap->va_fileid = node->u_ino; vap->va_mode = udf_permtomode(node); vap->va_nlink = letoh16(fentry->link_cnt); /* @@ -354,16 +354,16 @@ udf_getattr(void *v) */ if (fentry->logblks_rec != 0) { vap->va_size = - letoh64(fentry->logblks_rec) * node->udfmp->bsize; + letoh64(fentry->logblks_rec) * node->u_ump->bsize; } else { - vap->va_size = node->udfmp->bsize; + vap->va_size = node->u_ump->bsize; } } else { vap->va_size = letoh64(fentry->inf_len); } vap->va_flags = 0; vap->va_gen = 1; - vap->va_blocksize = node->udfmp->bsize; + vap->va_blocksize = node->u_ump->bsize; vap->va_bytes = letoh64(fentry->inf_len); vap->va_type = vp->v_type; vap->va_filerev = 0; @@ -431,7 +431,7 @@ udf_read(void *v) } */ *ap = v; struct vnode *vp = ap->a_vp; struct uio *uio = ap->a_uio; - struct udf_node *node = VTOU(vp); + struct unode *node = VTOU(vp); struct buf *bp; uint8_t *data; off_t fsize, offset; @@ -441,7 +441,7 @@ udf_read(void *v) if (uio->uio_offset < 0) return (EINVAL); - fsize = letoh64(node->fentry->inf_len); + fsize = letoh64(node->u_fentry->inf_len); while (uio->uio_offset < fsize && uio->uio_resid > 0) { offset = uio->uio_offset; @@ -561,7 +561,7 @@ udf_uiodir(struct udf_uiodir *uiodir, int de_size, struct uio *uio, long cookie) } static struct udf_dirstream * -udf_opendir(struct udf_node *node, int offset, int fsize, struct udf_mnt *udfmp) +udf_opendir(struct unode *node, int offset, int fsize, struct udf_mnt *udfmp) { struct udf_dirstream *ds; @@ -720,7 +720,7 @@ udf_readdir(void *v) struct vnode *vp; struct uio *uio; struct dirent dir; - struct udf_node *node; + struct unode *node; struct udf_mnt *udfmp; struct fileid_desc *fid; struct udf_uiodir uiodir; @@ -735,7 +735,7 @@ udf_readdir(void *v) vp = ap->a_vp; uio = ap->a_uio; node = VTOU(vp); - udfmp = node->udfmp; + udfmp = node->u_ump; uiodir.eofflag = 1; if (ap->a_ncookies != NULL) { @@ -758,8 +758,8 @@ udf_readdir(void *v) * Iterate through the file id descriptors. Give the parent dir * entry special attention. */ - ds = udf_opendir(node, uio->uio_offset, letoh64(node->fentry->inf_len), - node->udfmp); + ds = udf_opendir(node, uio->uio_offset, + letoh64(node->u_fentry->inf_len), node->u_ump); while ((fid = udf_getfid(ds)) != NULL) { @@ -779,7 +779,7 @@ udf_readdir(void *v) * used for the cookies since the offset here is * usually zero, and NFS doesn't like that value */ - dir.d_fileno = node->hash_id; + dir.d_fileno = node->u_ino; dir.d_type = DT_DIR; dir.d_name[0] = '.'; dir.d_name[1] = '\0'; @@ -855,7 +855,7 @@ udf_strategy(void *v) } */ *ap = v; struct buf *bp; struct vnode *vp; - struct udf_node *node; + struct unode *node; int maxsize, s, error; bp = ap->a_bp; @@ -868,7 +868,7 @@ udf_strategy(void *v) * Files that are embedded in the fentry don't translate well * to a block number. Reject. */ - if (udf_bmap_internal(node, bp->b_lblkno * node->udfmp->bsize, + if (udf_bmap_internal(node, bp->b_lblkno * node->u_ump->bsize, &bp->b_lblkno, &maxsize)) { clrbuf(bp); bp->b_blkno = -1; @@ -894,7 +894,7 @@ udf_strategy(void *v) splx(s); } else { bp->b_dev = vp->v_rdev; - VOCALL(node->i_devvp->v_op, VOFFSET(vop_strategy), ap); + VOCALL(node->u_devvp->v_op, VOFFSET(vop_strategy), ap); } return (0); @@ -911,7 +911,7 @@ udf_lock(void *v) struct vnode *vp = ap->a_vp; - return (lockmgr(&VTOU(vp)->i_lock, ap->a_flags, &vp->v_interlock)); + return (lockmgr(&VTOU(vp)->u_lock, ap->a_flags, &vp->v_interlock)); } int @@ -925,7 +925,7 @@ udf_unlock(void *v) struct vnode *vp = ap->a_vp; - return (lockmgr(&VTOU(vp)->i_lock, ap->a_flags | LK_RELEASE, + return (lockmgr(&VTOU(vp)->u_lock, ap->a_flags | LK_RELEASE, &vp->v_interlock)); } @@ -936,7 +936,7 @@ udf_islocked(void *v) struct vnode *a_vp; } */ *ap = v; - return (lockstatus(&VTOU(ap->a_vp)->i_lock)); + return (lockstatus(&VTOU(ap->a_vp)->u_lock)); } int @@ -946,13 +946,13 @@ udf_print(void *v) struct vnode *a_vp; } */ *ap = v; struct vnode *vp = ap->a_vp; - struct udf_node *node = VTOU(vp); + struct unode *node = VTOU(vp); /* * Complete the information given by vprint(). */ - printf("tag VT_UDF, hash id %u\n", node->hash_id); - lockmgr_printinfo(&node->i_lock); + printf("tag VT_UDF, hash id %u\n", node->u_ino); + lockmgr_printinfo(&node->u_lock); printf("\n"); return (0); @@ -968,7 +968,7 @@ udf_bmap(void *v) daddr_t *a_bnp; int *a_runp; } */ *ap = v; - struct udf_node *node; + struct unode *node; uint32_t max_size; daddr_t lsector; int error; @@ -976,17 +976,17 @@ udf_bmap(void *v) node = VTOU(ap->a_vp); if (ap->a_vpp != NULL) - *ap->a_vpp = node->i_devvp; + *ap->a_vpp = node->u_devvp; if (ap->a_bnp == NULL) return (0); - error = udf_bmap_internal(node, ap->a_bn * node->udfmp->bsize, &lsector, - &max_size); + error = udf_bmap_internal(node, ap->a_bn * node->u_ump->bsize, + &lsector, &max_size); if (error) return (error); /* Translate logical to physical sector number */ - *ap->a_bnp = lsector << (node->udfmp->bshift - DEV_BSHIFT); + *ap->a_bnp = lsector << (node->u_ump->bshift - DEV_BSHIFT); /* Punt on read-ahead for now */ if (ap->a_runp) @@ -1009,7 +1009,7 @@ udf_lookup(void *v) struct vnode *dvp; struct vnode *tdp = NULL; struct vnode **vpp = ap->a_vpp; - struct udf_node *node; + struct unode *node; struct udf_mnt *udfmp; struct fileid_desc *fid = NULL; struct udf_dirstream *ds; @@ -1026,12 +1026,12 @@ udf_lookup(void *v) dvp = ap->a_dvp; node = VTOU(dvp); - udfmp = node->udfmp; + udfmp = node->u_ump; nameiop = ap->a_cnp->cn_nameiop; flags = ap->a_cnp->cn_flags; nameptr = ap->a_cnp->cn_nameptr; namelen = ap->a_cnp->cn_namelen; - fsize = letoh64(node->fentry->inf_len); + fsize = letoh64(node->u_fentry->inf_len); p = ap->a_cnp->cn_proc; *vpp = NULL; @@ -1066,11 +1066,12 @@ udf_lookup(void *v) * directory may need to be searched twice. For a full description, * see /sys/isofs/cd9660/cd9660_lookup.c:cd9660_lookup() */ - if (nameiop != LOOKUP || node->diroff == 0 || node->diroff > fsize) { + if (nameiop != LOOKUP || node->u_diroff == 0 || + node->u_diroff > fsize) { offset = 0; numdirpasses = 1; } else { - offset = node->diroff; + offset = node->u_diroff; numdirpasses = 2; nchstats.ncs_2passes++; } @@ -1121,7 +1122,7 @@ lookloop: * component. */ if ((flags & ISLASTCN) && nameiop == LOOKUP) - node->diroff = ds->offset + ds->off; + node->u_diroff = ds->offset + ds->off; if (numdirpasses == 2) nchstats.ncs_pass2++; if (!(flags & LOCKPARENT) || !(flags & ISLASTCN)) { @@ -1185,22 +1186,22 @@ udf_reclaim(void *v) struct proc *a_p; } */ *ap = v; struct vnode *vp; - struct udf_node *unode; + struct unode *unode; vp = ap->a_vp; unode = VTOU(vp); if (unode != NULL) { udf_hashrem(unode); - if (unode->i_devvp) { - vrele(unode->i_devvp); - unode->i_devvp = 0; + if (unode->u_devvp) { + vrele(unode->u_devvp); + unode->u_devvp = 0; } - if (unode->fentry != NULL) - free(unode->fentry, M_UDFFENTRY); + if (unode->u_fentry != NULL) + free(unode->u_fentry, M_UDFFENTRY); - pool_put(&udf_node_pool, unode); + pool_put(&unode_pool, unode); vp->v_data = NULL; } @@ -1217,7 +1218,7 @@ udf_reclaim(void *v) * */ int -udf_readatoffset(struct udf_node *node, int *size, off_t offset, +udf_readatoffset(struct unode *node, int *size, off_t offset, struct buf **bp, uint8_t **data) { struct udf_mnt *udfmp; @@ -1227,7 +1228,7 @@ udf_readatoffset(struct udf_node *node, int *size, off_t offset, daddr_t sector; int error; - udfmp = node->udfmp; + udfmp = node->u_ump; *bp = NULL; error = udf_bmap_internal(node, offset, §or, &max_size); @@ -1236,7 +1237,7 @@ udf_readatoffset(struct udf_node *node, int *size, off_t offset, * This error means that the file *data* is stored in the * allocation descriptor field of the file entry. */ - fentry = node->fentry; + fentry = node->u_fentry; *data = &fentry->data[letoh32(fentry->l_ea)]; *size = letoh32(fentry->l_ad); return (0); @@ -1265,7 +1266,7 @@ udf_readatoffset(struct udf_node *node, int *size, off_t offset, * block. */ int -udf_bmap_internal(struct udf_node *node, off_t offset, daddr_t *sector, +udf_bmap_internal(struct unode *node, off_t offset, daddr_t *sector, uint32_t *max_size) { struct udf_mnt *udfmp; @@ -1277,8 +1278,8 @@ udf_bmap_internal(struct udf_node *node, off_t offset, daddr_t *sector, int ad_offset, ad_num = 0; int i, p_offset; - udfmp = node->udfmp; - fentry = node->fentry; + udfmp = node->u_ump; + fentry = node->u_fentry; tag = &fentry->icbtag; switch (letoh16(tag->strat_type)) { @@ -1351,7 +1352,7 @@ udf_bmap_internal(struct udf_node *node, off_t offset, daddr_t *sector, * allocation descriptor field of the file entry. */ *max_size = 0; - *sector = node->hash_id + udfmp->part_start; + *sector = node->u_ino + udfmp->part_start; return (UDF_INVALID_BMAP); case 2: |