summaryrefslogtreecommitdiff
path: root/sys/isofs
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-07-11 16:24:10 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-07-11 16:24:10 +0000
commite11439b493f7f17321c06b3e6ea713591ee1ac49 (patch)
treece5fe841d7db0592cf045147f68b84e837144f02 /sys/isofs
parent9e3378b8ac6fec14bd80280bd58beef0d7385154 (diff)
Make the mounting process pass a hint to the kernel of where to find the VAT
Diffstat (limited to 'sys/isofs')
-rw-r--r--sys/isofs/udf/udf_extern.h4
-rw-r--r--sys/isofs/udf/udf_subr.c6
-rw-r--r--sys/isofs/udf/udf_vfsops.c11
3 files changed, 10 insertions, 11 deletions
diff --git a/sys/isofs/udf/udf_extern.h b/sys/isofs/udf/udf_extern.h
index 7950d658271..011f5cbbe8f 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.6 2006/07/09 04:14:25 pedro Exp $ */
+/* $OpenBSD: udf_extern.h,v 1.7 2006/07/11 16:24:09 pedro Exp $ */
/*
* Written by Pedro Martelletto <pedro@openbsd.org> in February 2005.
@@ -9,7 +9,7 @@
* udf_subr.c
*/
int udf_rawnametounicode(u_int len, char *, unicode_t *);
-int udf_vat_get(struct umount *);
+int udf_vat_get(struct umount *, uint32_t);
int udf_vat_map(struct umount *, uint32_t *);
/*
diff --git a/sys/isofs/udf/udf_subr.c b/sys/isofs/udf/udf_subr.c
index cc58cd9fb51..d976a37fd8f 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.9 2006/07/09 04:14:25 pedro Exp $ */
+/* $OpenBSD: udf_subr.c,v 1.10 2006/07/11 16:24:09 pedro Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
@@ -183,13 +183,13 @@ out:
/* Get a vnode for the Virtual Allocation Table (VAT) */
int
-udf_vat_get(struct umount *ump)
+udf_vat_get(struct umount *ump, uint32_t lb)
{
struct vnode *vp;
struct unode *up;
int error;
- error = udf_vget(ump->um_mountp, ump->um_len - 3, &vp);
+ error = udf_vget(ump->um_mountp, lb - ump->um_start - 3, &vp);
if (error)
return (error);
diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c
index b69cce5b114..efd87e012f5 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.19 2006/07/09 04:23:09 pedro Exp $ */
+/* $OpenBSD: udf_vfsops.c,v 1.20 2006/07/11 16:24:09 pedro Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -79,6 +79,7 @@ struct pool udf_ds_pool;
int udf_find_partmaps(struct umount *, struct logvol_desc *);
int udf_get_vpartmap(struct umount *, struct part_map_virt *);
int udf_get_spartmap(struct umount *, struct part_map_spare *);
+int udf_mountfs(struct vnode *, struct mount *, uint32_t, struct proc *);
const struct vfsops udf_vfsops = {
.vfs_fhtovp = udf_fhtovp,
@@ -96,8 +97,6 @@ const struct vfsops udf_vfsops = {
.vfs_checkexp = udf_checkexp,
};
-int udf_mountfs(struct vnode *, struct mount *, struct proc *);
-
int
udf_init(struct vfsconf *foo)
{
@@ -171,7 +170,7 @@ udf_mount(struct mount *mp, const char *path, void *data,
}
}
- if ((error = udf_mountfs(devvp, mp, p))) {
+ if ((error = udf_mountfs(devvp, mp, args.lastblock, p))) {
vrele(devvp);
return (error);
}
@@ -213,7 +212,7 @@ udf_checktag(struct desc_tag *tag, uint16_t id)
}
int
-udf_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
+udf_mountfs(struct vnode *devvp, struct mount *mp, uint32_t lb, struct proc *p)
{
struct buf *bp = NULL;
struct anchor_vdp avdp;
@@ -335,7 +334,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
/* Get the VAT, if needed */
if (ump->um_flags & UDF_MNT_FIND_VAT) {
- error = udf_vat_get(ump);
+ error = udf_vat_get(ump, lb);
if (error)
goto bail;
}