Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys move cd9660 filesystem code from sys/isofs/cd9660 to sys...
details: https://anonhg.NetBSD.org/src/rev/1e0e6ad0bd64
branches: trunk
changeset: 540765:1e0e6ad0bd64
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Dec 23 17:52:02 2002 +0000
description:
move cd9660 filesystem code from sys/isofs/cd9660 to sys/fs/cd9660
diffstat:
sys/Makefile | 4 +-
sys/conf/files | 4 +-
sys/fs/Makefile | 4 +-
sys/fs/cd9660/Makefile | 8 +
sys/fs/cd9660/TODO | 47 +
sys/fs/cd9660/TODO.hibler | 13 +
sys/fs/cd9660/cd9660_bmap.c | 109 +++
sys/fs/cd9660/cd9660_extern.h | 115 ++++
sys/fs/cd9660/cd9660_lookup.c | 470 ++++++++++++++++
sys/fs/cd9660/cd9660_mount.h | 59 ++
sys/fs/cd9660/cd9660_node.c | 547 +++++++++++++++++++
sys/fs/cd9660/cd9660_node.h | 153 +++++
sys/fs/cd9660/cd9660_rrip.c | 745 ++++++++++++++++++++++++++
sys/fs/cd9660/cd9660_rrip.h | 142 +++++
sys/fs/cd9660/cd9660_util.c | 194 ++++++
sys/fs/cd9660/cd9660_vfsops.c | 1009 ++++++++++++++++++++++++++++++++++++
sys/fs/cd9660/cd9660_vnops.c | 1064 ++++++++++++++++++++++++++++++++++++++
sys/fs/cd9660/files.cd9660 | 11 +
sys/fs/cd9660/iso.h | 301 ++++++++++
sys/fs/cd9660/iso_rrip.h | 85 +++
sys/isofs/Makefile | 7 -
sys/isofs/cd9660/Makefile | 8 -
sys/isofs/cd9660/TODO | 47 -
sys/isofs/cd9660/TODO.hibler | 13 -
sys/isofs/cd9660/cd9660_bmap.c | 109 ---
sys/isofs/cd9660/cd9660_extern.h | 115 ----
sys/isofs/cd9660/cd9660_lookup.c | 470 ----------------
sys/isofs/cd9660/cd9660_mount.h | 59 --
sys/isofs/cd9660/cd9660_node.c | 547 -------------------
sys/isofs/cd9660/cd9660_node.h | 153 -----
sys/isofs/cd9660/cd9660_rrip.c | 745 --------------------------
sys/isofs/cd9660/cd9660_rrip.h | 142 -----
sys/isofs/cd9660/cd9660_util.c | 194 ------
sys/isofs/cd9660/cd9660_vfsops.c | 1009 ------------------------------------
sys/isofs/cd9660/cd9660_vnops.c | 1064 --------------------------------------
sys/isofs/cd9660/files.cd9660 | 11 -
sys/isofs/cd9660/iso.h | 301 ----------
sys/isofs/cd9660/iso_rrip.h | 85 ---
sys/lkm/vfs/cd9660/Makefile | 4 +-
39 files changed, 5080 insertions(+), 5087 deletions(-)
diffs (truncated from 10346 to 300 lines):
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/Makefile
--- a/sys/Makefile Mon Dec 23 17:45:14 2002 +0000
+++ b/sys/Makefile Mon Dec 23 17:52:02 2002 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.49 2002/12/23 17:38:21 jdolecek Exp $
+# $NetBSD: Makefile,v 1.50 2002/12/23 17:52:02 jdolecek Exp $
-SUBDIR= altq arch compat dev fs isofs lkm miscfs msdosfs \
+SUBDIR= altq arch compat dev fs lkm miscfs msdosfs \
net netatalk netccitt netinet netinet6 netisdn netiso netkey \
netnatm netns netsmb nfs sys ufs uvm
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/conf/files
--- a/sys/conf/files Mon Dec 23 17:45:14 2002 +0000
+++ b/sys/conf/files Mon Dec 23 17:52:02 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.585 2002/12/23 17:38:19 jdolecek Exp $
+# $NetBSD: files,v 1.586 2002/12/23 17:52:03 jdolecek Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -967,7 +967,7 @@
include "coda/files.coda"
include "fs/filecorefs/files.filecorefs"
include "fs/smbfs/files.smbfs"
-include "isofs/cd9660/files.cd9660"
+include "fs/cd9660/files.cd9660"
include "miscfs/fdesc/files.fdesc"
include "miscfs/kernfs/files.kernfs"
include "miscfs/nullfs/files.nullfs"
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/fs/Makefile
--- a/sys/fs/Makefile Mon Dec 23 17:45:14 2002 +0000
+++ b/sys/fs/Makefile Mon Dec 23 17:52:02 2002 +0000
@@ -1,5 +1,5 @@
-# $NetBSD: Makefile,v 1.4 2002/12/23 17:38:21 jdolecek Exp $
+# $NetBSD: Makefile,v 1.5 2002/12/23 17:52:03 jdolecek Exp $
-SUBDIR= adosfs filecorefs ntfs smbfs
+SUBDIR= adosfs cd9660 filecorefs ntfs smbfs
.include <bsd.kinc.mk>
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/fs/cd9660/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/fs/cd9660/Makefile Mon Dec 23 17:52:02 2002 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.1 2002/12/23 17:52:08 jdolecek Exp $
+
+INCSDIR= /usr/include/isofs/cd9660
+
+INCS= cd9660_extern.h cd9660_mount.h cd9660_node.h cd9660_rrip.h iso.h \
+ iso_rrip.h
+
+.include <bsd.kinc.mk>
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/fs/cd9660/TODO
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/fs/cd9660/TODO Mon Dec 23 17:52:02 2002 +0000
@@ -0,0 +1,47 @@
+# $NetBSD: TODO,v 1.1 2002/12/23 17:52:08 jdolecek Exp $
+
+ 1) should understand "older", original High Sierra ("CDROM001") type
+
+ Not yet. ( I don't have this technical information, yet. )
+
+ 2) should understand Rock Ridge
+
+ Yes, we have follows function.
+
+ o Symbolic Link
+ o Real Name(long name)
+ o File Attribute
+ o Time stamp
+ o uid, gid
+ o Devices
+ o Relocated directories
+
+ Except follows:
+
+ o POSIX device number mapping
+
+ There is some preliminary stuff in there that (ab-)uses the mknod
+ system call, but this needs a writable filesystem
+
+ 5) should have name translation enabled by mount flag
+
+ Yes. we can disable the Rock Ridge Extension by follows option;
+
+ "mount -t isofs -o -norrip /dev/cd0d /cdrom"
+
+ 6) should run as a user process, and not take up kernel space (cdroms
+ are slow)
+
+ Not yet.
+
+ 7) ECMA support.
+
+ Not yet. we need not only a technical spec but also ECMA format
+ cd-rom itself!
+
+ 8) Character set change by SVD ( multi SVD support )
+
+ Not yet. We should also hack the other part of system as 8 bit
+ clean. As far as I know, if you export the cdrom by NFS, the client
+ can access the 8 bit clean (ie. Solaris Japanese with EUC code )
+
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/fs/cd9660/TODO.hibler
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/fs/cd9660/TODO.hibler Mon Dec 23 17:52:02 2002 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: TODO.hibler,v 1.1 2002/12/23 17:52:08 jdolecek Exp $
+
+1. Investiate making ISOFS another UFS shared filesystem (ala FFS/MFS/LFS).
+ Since it was modelled after the inode code, we might be able to merge
+ them back. It looks like a separate (but very similar) lookup routine
+ will be needed due to the associated file stuff.
+
+2. It would be nice to be able to use the vfs_cluster code.
+ Unfortunately, if the logical block size is smaller than the page size,
+ it won't work. Also, if throughtput is relatively constant for any
+ block size (as it is for the HP drive--150kbs) then clustering may not
+ buy much (or may even hurt when vfs_cluster comes up with a large sync
+ cluster).
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/fs/cd9660/cd9660_bmap.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/fs/cd9660/cd9660_bmap.c Mon Dec 23 17:52:02 2002 +0000
@@ -0,0 +1,109 @@
+/* $NetBSD: cd9660_bmap.c,v 1.1 2002/12/23 17:52:08 jdolecek Exp $ */
+
+/*-
+ * Copyright (c) 1994
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley
+ * by Pace Willisson (pace%blitz.com@localhost). The Rock Ridge Extension
+ * Support code is derived from software contributed to Berkeley
+ * by Atsushi Murai (amurai%spec.co.jp@localhost).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)cd9660_bmap.c 8.4 (Berkeley) 12/5/94
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: cd9660_bmap.c,v 1.1 2002/12/23 17:52:08 jdolecek Exp $");
+
+#include <sys/param.h>
+#include <sys/namei.h>
+#include <sys/buf.h>
+#include <sys/file.h>
+#include <sys/vnode.h>
+#include <sys/mount.h>
+
+#include <fs/cd9660/iso.h>
+#include <fs/cd9660/cd9660_extern.h>
+#include <fs/cd9660/cd9660_node.h>
+
+/*
+ * Bmap converts a the logical block number of a file to its physical block
+ * number on the disk. The conversion is done by using the logical block
+ * number to index into the data block (extent) for the file.
+ */
+int
+cd9660_bmap(v)
+ void *v;
+{
+ struct vop_bmap_args /* {
+ struct vnode *a_vp;
+ daddr_t a_bn;
+ struct vnode **a_vpp;
+ daddr_t *a_bnp;
+ int *a_runp;
+ } */ *ap = v;
+ struct iso_node *ip = VTOI(ap->a_vp);
+ daddr_t lblkno = ap->a_bn;
+ int bshift;
+
+ /*
+ * Check for underlying vnode requests and ensure that logical
+ * to physical mapping is requested.
+ */
+ if (ap->a_vpp != NULL)
+ *ap->a_vpp = ip->i_devvp;
+ if (ap->a_bnp == NULL)
+ return (0);
+
+ /*
+ * Compute the requested block number
+ */
+ bshift = ip->i_mnt->im_bshift;
+ *ap->a_bnp = (ip->iso_start + lblkno) << (bshift - DEV_BSHIFT);
+
+ /*
+ * Determine maximum number of readahead blocks following the
+ * requested block.
+ */
+ if (ap->a_runp) {
+ int nblk;
+
+ nblk = (ip->i_size >> bshift) - (lblkno + 1);
+ if (nblk <= 0)
+ *ap->a_runp = 0;
+ else if (nblk >= (MAXBSIZE >> bshift))
+ *ap->a_runp = (MAXBSIZE >> bshift) - 1;
+ else
+ *ap->a_runp = nblk;
+ }
+
+ return (0);
+}
diff -r bb8af4e37e29 -r 1e0e6ad0bd64 sys/fs/cd9660/cd9660_extern.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/fs/cd9660/cd9660_extern.h Mon Dec 23 17:52:02 2002 +0000
@@ -0,0 +1,115 @@
+/* $NetBSD: cd9660_extern.h,v 1.1 2002/12/23 17:52:08 jdolecek Exp $ */
+
+/*-
+ * Copyright (c) 1994
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley
+ * by Pace Willisson (pace%blitz.com@localhost). The Rock Ridge Extension
+ * Support code is derived from software contributed to Berkeley
+ * by Atsushi Murai (amurai%spec.co.jp@localhost).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)iso.h 8.4 (Berkeley) 12/5/94
+ */
+
+/*
+ * Definitions used in the kernel for cd9660 file system support.
+ */
+
+/* CD-ROM Format type */
+enum ISO_FTYPE { ISO_FTYPE_DEFAULT, ISO_FTYPE_9660, ISO_FTYPE_RRIP, ISO_FTYPE_ECMA };
+
+#ifndef ISOFSMNT_ROOT
+#define ISOFSMNT_ROOT 0
+#endif
+
+struct iso_mnt {
+ int im_flags;
+ int im_joliet_level;
+
+ struct mount *im_mountp;
+ dev_t im_dev;
+ struct vnode *im_devvp;
+
+ int logical_block_size;
Home |
Main Index |
Thread Index |
Old Index