summaryrefslogtreecommitdiffstats
path: root/sys/isofs
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the handling of VCHR and VBLK vnodes using the new dev_t:phk1999-08-261-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the alias list a SLIST. Drop the "fast recycling" optimization of vnodes (including the returning of a prexisting but stale vnode from checkalias). It doesn't buy us anything now that we don't hardlimit vnodes anymore. Rename checkalias2() and checkalias() to addalias() and addaliasu() - which takes dev_t and udev_t arg respectively. Make the revoke syscalls use vcount() instead of VALIASED. Remove VALIASED flag, we don't need it now and it is faster to traverse the much shorter lists than to maintain the flag. vfs_mountedon() can check the dev_t directly, all the vnodes point to the same one. Print the devicename in specfs/vprint(). Remove a couple of stale LFS vnode flags. Remove unimplemented/unused LK_DRAINED;
* Introduce vn_isdisk(struct vnode *vp) function, and use it to test for diskness.phk1999-08-251-6/+2
|
* Initialise fsids with (user) device numbers again. Bitrot when dev_t'sbde1999-08-231-2/+2
| | | | | were changed to pointers was obscured by casting dev_t's to longs. fsids haven't even been comprised of longs since the Lite2 merge.
* The bdevsw() and cdevsw() are now identical, so kill the former.phk1999-08-131-6/+6
|
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,phk1999-08-082-4/+3
| | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
* I have not one single time remembered the name of this function correctlyphk1999-07-171-3/+3
| | | | so obviously I gave it the wrong name. s/umakedev/makeudev/g
* Simplify cdevsw registration.phk1999-05-311-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-114-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-081-6/+6
| | | | | | | | Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
* The lowercasing of Joliet filenames was not a feature.dcs1999-05-081-2/+2
|
* Continue where Julian left off in July 1998:phk1999-05-071-6/+6
| | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
* Suser() simplification:phk1999-04-271-2/+2
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Add support for Joliet extensions to the iso9660 fs. The related PRdcs1999-04-187-82/+224
| | | | | | | | | | | | | cannot yet be closed, though. I hope I got all credits right, and that the multiple submitted by lines do not break anyone's scripts... PR: kern/5038, kern/5567 Submitted by: Keith Jang <keith@email.gcn.net.tw> Submitted by: Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de> Submitted by: Byung Yang <byung@wam.umd.edu> Submitted by: Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
* Don't comment out dead code; remove it.bde1999-01-311-4/+1
|
* Use suser() to determine super-user-ness.phk1999-01-301-17/+15
| | | | | | Don't pretend we can mount RW. Reviewed by: bde
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-2/+2
| | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-274-25/+32
| | | | kernel compile
* Mountroot could concievably make sense to a KLD though, in the preloadpeter1999-01-171-6/+1
| | | | case. I'm not sure the autoconf code is up to it though...
* Ifdefed conditionally used simplock variables.bde1999-01-021-1/+3
|
* MFC: loosen compare even though bde doesn't like it.jkh1998-12-061-3/+3
|
* Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rottedbde1998-10-251-2/+3
| | | | | when bdevsw[] became sparse. We still depend on magic to avoid having to check that (v_rdev) device numbers in vnodes are not NODEV.
* Remove the SLICE code.sos1998-09-141-13/+1
| | | | | This clearly needs alot more thought, and we dont need this to hunt us down in 3.0-RELEASE.
* Removed statically configured mount type numbers (MOUNT_*) and allbde1998-09-071-3/+3
| | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct.
* Fix problem reported on bugtraq: check permission of device mountedguido1998-09-071-1/+19
| | | | | for non-root users. Fortunately, the default for vfs.usermount is 0. Tested by: "Jan B. Koum " <jkb@best.com
* There is no such thing any more as "struct bdevsw".julian1998-07-041-2/+2
| | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind.
* VOP_STRATEGY grows an (struct vnode *) argumentjulian1998-07-041-2/+3
| | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org>
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* As described by the submitter:msmith1998-05-061-16/+1
| | | | | | | | | | | | | Reverse the VFS_VRELE patch. Reference counting of vnodes does not need to be done per-fs. I noticed this while fixing vfs layering violations. Doing reference counting in generic code is also the preference cited by John Heidemann in recent discussions with him. The implementation of alternative vnode management per-fs is still a valid requirement for some filesystems but will be revisited sometime later, most likely using a different framework. Submitted by: Michael Hancock <michaelh@cet.co.jp>
* The 'mountroot' option is obviously pointless for an LKMjulian1998-04-201-3/+9
| | | | | so allow LKM compilation to succeed by making it go away for that case. Saves needing to include opt_devfs.h which an LKM cannot rely on anyhow.
* Make the devfs SLICE option a standard type option.julian1998-04-201-1/+2
| | | | (hopefully it will go away eventually anyhow)
* Add changes and code to implement a functional DEVFS.julian1998-04-191-1/+12
| | | | | | | | | | | | | | | | | | | | | This code will be turned on with the TWO options DEVFS and SLICE. (see LINT) Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes. /dev will be automatically mounted by init (thanks phk) on bootup. See /sys/dev/slice/slice.4 for more info. All code should act the same without these options enabled. Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others This code does not support the following: bad144 handling. Persistance. (My head is still hurting from the last time we discussed this) ATAPI flopies are not handled by the SLICE code yet. When this code is running, all major numbers are arbitrary and COULD be dynamically assigned. (this is not done, for POLA only) Minor numbers for disk slices ARE arbitray and dynamically assigned.
* Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)julian1998-03-081-5/+6
| | | | | Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree
* Trivial filesystem getpages/putpages implementations, set the second.msmith1998-03-061-1/+35
| | | | | These should be considered the first steps in a work-in-progress. Submitted by: Terry Lambert <terry@freebsd.org>
* The intent is to get rid of WILLRELE in vnode_if.src by makingmsmith1998-03-011-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a complement to all ops that return a vpp, VFS_VRELE. This is initially only for file systems that implement the following ops that do a WILLRELE: vop_create, vop_whiteout, vop_mknod, vop_remove, vop_link, vop_rename, vop_mkdir, vop_rmdir, vop_symlink This is initial DNA that doesn't do anything yet. VFS_VRELE is implemented but not called. A default vfs_vrele was created for fs implementations that use the standard vnode management routines. VFS_VRELE implementations were made for the following file systems: Standard (vfs_vrele) ffs mfs nfs msdosfs devfs ext2fs Custom union umapfs Just EOPNOTSUPP fdesc procfs kernfs portal cd9660 These implementations may change as VOP changes are implemented. In the next phase, in the vop implementations calls to vrele and the vrele part of vput will be moved to the top layer vfs_vnops and made visible to all layers. vput will be replaced by unlock in these cases. Unlocking will still be done in the per fs layer but the refcount decrement will be triggered at the top because it doesn't hurt to hold a vnode reference a little longer. This will have minimal impact on the structure of the existing code. This will only be done for vnode arguments that are released by the various fs vop implementations. Wider use of VFS_VRELE will likely require restructuring of the code. Reviewed by: phk, dyson, terry et. al. Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Staticize.eivind1998-02-091-4/+4
|
* Back out DIAGNOSTIC changes.eivind1998-02-061-3/+1
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-1/+3
|
* Forward declare some structs so that this file is more self-sufficient.bde1998-02-031-1/+3
|
* Forward declare some structs so that this file is more self-sufficient.bde1998-02-031-1/+11
| | | | Don't declare kernel objects or functions unless KERNEL is defined.
* Unspammed nested include of <vm/vm_zone.h>.bde1997-12-271-1/+3
|
* Properly clean out the SI_MOUNTEDON flag iff the mount attempt failsjoerg1997-12-211-1/+2
| | | | | | | | | | | half the way down. Otherwise, further attempts to mount the device will be rejected with BUSY. IMHO, this flag can completely go away for cd9660. There's no reason you need to prevent CDs from being mounted multiple times, and in case of multisession CDs it can even make sense to mount two different sessions by the same time (to different mount points, otherwise it would be pointless ;).
* Staticize a few things.phk1997-11-183-11/+10
|
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-072-4/+3
| | | | Found by: -Wunused
* Use bread() instead of cluster_read() for reading the last blockbde1997-10-271-2/+2
| | | | | | | | | | in a file. There was a (harmless, I think) off-by-1 error. This was fixed in ufs long ago (rev.1.21 of ufs_readwrite.c) but not in cd9660. cd9660_read() has stagnated in many other ways. It is closer to the Net/2 ufs_read() (which is was cloned from) than ufs_read() itself is.
* Removed unused #includes. The need for most of them went away withbde1997-10-271-2/+1
| | | | recent changes (docluster* and vfs improvements).
* VFS interior redecoration.phk1997-10-261-2/+2
| | | | | | | | | | | | | Rename vn_default_error to vop_defaultop all over the place. Move vn_bwrite from vfs_bio.c to vfs_default.c and call it vop_stdbwrite. Use vop_null instead of nullop. Move vop_nopoll from vfs_subr.c to vfs_default.c Move vop_sharedlock from vfs_subr.c to vfs_default.c Move vop_nolock from vfs_subr.c to vfs_default.c Move vop_nounlock from vfs_subr.c to vfs_default.c Move vop_noislocked from vfs_subr.c to vfs_default.c Use vop_ebadf instead of *_ebadf. Add vop_defaultop for getpages on master vnode in MFS.
* Make a set of VOP standard lock, unlock & islocked VOP operators, whichphk1997-10-172-62/+12
| | | | | depend on the lock being located at vp->v_data. Saves 3x3 identical vop procs, more as the other filesystems becomes lock aware.
* Another VFS cleanup "kilo commit"phk1997-10-161-102/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove VOP_UPDATE, it is (also) an UFS/{FFS,LFS,EXT2FS,MFS} intereface function, and now lives in the ufsmount structure. 2. Remove VOP_SEEK, it was unused. 3. Add mode default vops: VOP_ADVLOCK vop_einval VOP_CLOSE vop_null VOP_FSYNC vop_null VOP_IOCTL vop_enotty VOP_MMAP vop_einval VOP_OPEN vop_null VOP_PATHCONF vop_einval VOP_READLINK vop_einval VOP_REALLOCBLKS vop_eopnotsupp And remove identical functionality from filesystems 4. Add vop_stdpathconf, which returns the canonical stuff. Use it in the filesystems. (XXX: It's probably wrong that specfs and fifofs sets this vop, shouldn't it come from the "host" filesystem, for instance ufs or cd9660 ?) 5. Try to make system wide VOP functions have vop_* names. 6. Initialize the um_* vectors in LFS. (Recompile your LKMS!!!)
* VFS mega cleanup commit (x/N)phk1997-10-165-92/+28
| | | | | | | | | | | | | | | | | | | | | | | 1. Add new file "sys/kern/vfs_default.c" where default actions for VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE, POLL, REVOKE and STRATEGY. Various stuff spread over the entire tree belongs here. 2. Change VOP_BLKATOFF to a normal function in cd9660. 3. Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC. These are private interface functions between UFS and the underlying storage manager layer (FFS/LFS/MFS/EXT2FS). The functions now live in struct ufsmount instead. 4. Remove a kludge of VOP_ functions in all filesystems, that did nothing but obscure the simplicity and break the expandability. If a filesystem doesn't implement VOP_FOO, it shouldn't have an entry for it in its vnops table. The system will try to DTRT if it is not implemented. There are still some cruft left, but the bulk of it is done. 5. Fix another VCALL in vfs_cache.c (thanks Bruce!)
* vnops megacommitphk1997-10-151-65/+3
| | | | | | | | | | 1. Use the default function to access all the specfs operations. 2. Use the default function to access all the fifofs operations. 3. Use the default function to access all the ufs operations. 4. Fix VCALL usage in vfs_cache.c 5. Use VOCALL to access specfs functions in devfs_vnops.c 6. Staticize most of the spec and fifofs vnops functions. 7. Make UFS panic if it lacks bits of the underlying storage handling.
OpenPOWER on IntegriCloud