summaryrefslogtreecommitdiff
path: root/sys/isofs/udf/udf_vfsops.c
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-07-08 23:12:00 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-07-08 23:12:00 +0000
commit4ecda02ed8c4d3f0d3a673df098f978e9c631894 (patch)
treef71d2d82e8581c1bd2f664023432a04c05e9ab65 /sys/isofs/udf/udf_vfsops.c
parent0cf83bef9479c9ad43a8b6c3ccd0b0076bd944c2 (diff)
udf_node -> unode and rename fields accordingly
Diffstat (limited to 'sys/isofs/udf/udf_vfsops.c')
-rw-r--r--sys/isofs/udf/udf_vfsops.c46
1 files changed, 23 insertions, 23 deletions
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, &sector);
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);
}