summaryrefslogtreecommitdiffstats
path: root/sys/isofs/cd9660/cd9660_vfsops.c
Commit message (Collapse)AuthorAgeFilesLines
* First save from editor, *then* commit.phk2004-12-071-2/+1
|
* Fix exports.phk2004-12-071-6/+4
|
* The remaining part of nmount/omount/rootfs mount changes. I cannot sensiblyphk2004-12-071-127/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | split the conversion of the remaining three filesystems out from the root mounting changes, so in one go: cd9660: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() nfs(client): Convert to nmount (the simple way, mount_nfs(8) is still necessary). Add omount compat shims. Drop COMPAT_PRELITE2 mount arg compatibility. ffs: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() Remove vfs_omount() method, all filesystems are now converted. Remove MNTK_WANTRDWR, handling RO/RW conversions is a filesystem task, and they all do it now. Change rootmounting to use DEVFS trampoline: vfs_mount.c: Mount devfs on /. Devfs needs no 'from' so this is clean. symlink /dev to /. This makes it possible to lookup /dev/foo. Mount "real" root filesystem on /. Surgically move the devfs mountpoint from under the real root filesystem onto /dev in the real root filesystem. Remove now unnecessary getdiskbyname(). kern_init.c: Don't do devfs mounting and rootvnode assignment here, it was already handled by vfs_mount.c. Remove now unused bdevvp(), addaliasu() and addalias(). Put the few necessary lines in devfs where they belong. This eliminates the second-last source of bogo vnodes, leaving only the lemming-syncer. Remove rootdev variable, it doesn't give meaning in a global context and was not trustworth anyway. Correct information is provided by statfs(/).
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-5/+0
| | | | | | | | doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* Detect root mount attempts on the flag, not on the NULL path.phk2004-11-091-1/+1
|
* Move CD9660 to GEOM backing instead of DEVFS.phk2004-10-291-27/+28
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Hold proper thread count while frobbing drivers ioctl.phk2004-09-241-6/+13
|
* De support opening device nodes on CD9660 filesystems. They arephk2004-09-211-8/+0
| | | | | still visible, they can still be seen, but they cannot be opened. Use DEVFS for that.
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-8/+8
| | | | | | | | | | | | | | | | | | and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code.
* Remove global variable rootdevs and rootvp, they are unused as such.phk2004-07-281-1/+2
| | | | | | | | Add local rootvp variables as needed. Remove checks for miniroot's in the swappartition. We never did that and most of the filesystems could never be used for that, but it had still been copy&pasted all over the place.
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-2/+3
| | | | | | This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
* Remove "register" keyword and trailing white space.phk2004-07-031-25/+25
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-4/+4
| | | | Bump __FreeBSD_version accordingly.
* Remove advertising clause from University of California Regent'simp2004-04-071-4/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Remove unused second arg to vfinddev().phk2004-03-111-1/+3
| | | | Don't call addaliasu() on VBLK nodes.
* - Support for multibyte charsets in LIBICONV.fjoe2003-09-261-1/+19
| | | | | | | | - CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options (with corresponding modules). - kiconv(3) for loadable charset conversion tables support. Submitted by: Ryuichiro Imura <imura@ryu16.org>
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-08-071-2/+2
| | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c)
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-261-2/+2
| | | | | | | | | contain the filedescriptor number on opens from userland. The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/* For now pass -1 all over the place.
* Initialize struct vfsops C99-sparsely.phk2003-06-121-14/+9
| | | | | Submitted by: hmp Reviewed by: phk
* Use __FBSDID().obrien2003-06-111-1/+3
|
* Rename vfs_stdsync function to vfs_stdnosync which matches morekan2003-03-111-1/+1
| | | | | | | | | | | | | closely what function is really doing. Update all existing consumers to use the new name. Introduce a new vfs_stdsync function, which iterates over mount point's vnodes and call FSYNC on each one of them in turn. Make nwfs and smbfs use this new function instead of rolling their own identical sync implementations. Reviewed by: jeff
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Unbreak MNT_UPDATE when running with cd as root. Detect mountroot bypeter2002-11-021-2/+1
| | | | | | | | | checking for "path == NULL" (like ffs) rather than MNT_ROOT. Otherwise when you try and do an update or mountd does an NFS export, the remount fails because the code tries to mount a fresh rootfs and gets an EBUSY. The same bug is in 4.x (which is where I found it). Sanity check by: mux
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-141-5/+0
| | | | | | | | | | | | | | | | | | | | that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock). In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme. Sponsored by: DARPA & NAI Labs.
* Be consistent about "static" functions: if the function is markedphk2002-09-281-4/+4
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-141-1/+1
| | | | | | | | | | | | v_tag is now const char * and should only be used for debugging. Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP. Suggested by: phk Reviewed by: bde, rwatson (earlier version)
* Introduce typedefs for the member functions of struct vfsops and employphk2002-08-131-8/+7
| | | | | | | these in the main filesystems. This does not change the resulting code but makes the source a little bit more grepable. Sponsored by: DARPA and NAI Labs.
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-041-1/+1
| | | | | | | | | | | | | | | - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking. Idea stolen from: BSD/OS
* More s/file system/filesystem/gtrhodes2002-05-161-1/+1
|
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* In ffs_mountffs(), set mnt_iosize_max to si_iosize_max unconditionallybde2002-03-301-0/+4
| | | | | | | | | | | | | | | | provided the latter is nonzero. At this point, the former is a fairly arbitrary default value (DFTPHYS), so changing it to any reasonable value specified by the device driver is safe. Using the maximum of these limits broke ffs clustered i/o for devices whose si_iosize_max is < DFLTPHYS. Using the minimum would break device drivers' ability to increase the active limit from DFTLPHYS up to MAXPHYS. Copied the code for this and the associated (unnecessary?) fixup of mp_iosize_max to all other filesystems that use clustering (ext2fs and msdosfs). It was completely missing. PR: 36309 MFC-after: 1 week
* Fixed some style bugs in the removal of __P(()). Continuation linesbde2002-03-241-1/+1
| | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting in some cases.
* Remove __P.alfred2002-03-201-12/+12
|
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-171-7/+23
| | | | | | | | | | | | locking flags when acquiring a vnode. The immediate purpose is to allow polling lock requests (LK_NOWAIT) needed by soft updates to avoid deadlock when enlisting other processes to help with the background cleanup. For the future it will allow the use of shared locks for read access to vnodes. This change touches a lot of files as it affects most filesystems within the system. It has been well tested on FFS, loopback, and CD-ROM filesystems. only lightly on the others, so if you find a problem there, please let me (mckusick@mckusick.com) know.
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-2/+2
| | | | reference.
* Fix mounting root from a ISO9660 filesystem on a SCSI CDROM.ken2001-11-271-0/+10
| | | | | | | | | | | | | | | | | | | | | The problem was that the ISO9660 code wasn't opening the device prior to issuing ioctl calls. In particular, the device must be open before iso_get_ssector() is called in iso_mountroot(). If the device isn't opened first, the disk layer blows up due to an uninitialized variable. The solution was to open the device, call iso_get_ssector() and then close it again. The ATAPI CDROM driver doesn't have this problem because it doesn't use the disk layer, and evidently doesn't mind if someone issues an ioctl without first issuing an open call. Thanks to phk for pointing me at the source of this problem. Tested by: dirk MFC after: 1 week
* KSE Milestone 2julian2001-09-121-37/+37
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Change the second argument of vflush() to an integer that specifiesiedowse2001-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | the number of references on the filesystem root vnode to be both expected and released. Many filesystems hold an extra reference on the filesystem root vnode, which must be accounted for when determining if the filesystem is busy and then released if it isn't busy. The old `skipvp' approach required individual filesystem xxx_unmount functions to re-implement much of vflush()'s logic to deal with the root vnode. All 9 filesystems that hold an extra reference on the root vnode got the logic wrong in the case of forced unmounts, so `umount -f' would always fail if there were any extra root vnode references. Fix this issue centrally in vflush(), now that we can. This commit also fixes a vnode reference leak in devfs, which could result in idle devfs filesystems that refuse to unmount. Reviewed by: phk, bp
* Revert consequences of changes to mount.h, part 2.grog2001-04-291-2/+0
| | | | Requested by: bde
* Move the netexport structure from the fs-specific mountstructurephk2001-04-251-28/+2
| | | | | | | | | | | | | | to struct mount. This makes the "struct netexport *" paramter to the vfs_export and vfs_checkexport interface unneeded. Consequently that all non-stacking filesystems can use vfs_stdcheckexp(). At the same time, make it a pointer to a struct netexport in struct mount, so that we can remove the bogus AF_MAX and #include <net/radix.h> from <sys/mount.h>
* Correct #includes to work with fixed sys/mount.h.grog2001-04-231-0/+2
|
* Add missed MODULE_VERSION() call, so loading of unicode conversion routinesobomax2001-03-111-0/+1
| | | | | | works properly. Clue beaten in by: des
* Add a mount time option which slightly relaxes checks for valid Joiletbp2001-03-111-1/+2
| | | | | | | extensions. PR: kern/23315 Reviewed by: adrian
* Reviewed by: jlemonadrian2001-03-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | An initial tidyup of the mount() syscall and VFS mount code. This code replaces the earlier work done by jlemon in an attempt to make linux_mount() work. * the guts of the mount work has been moved into vfs_mount(). * move `type', `path' and `flags' from being userland variables into being kernel variables in vfs_mount(). `data' remains a pointer into userspace. * Attempt to verify the `type' and `path' strings passed to vfs_mount() aren't too long. * rework mount() and linux_mount() to take the userland parameters (besides data, as mentioned) and pass kernel variables to vfs_mount(). (linux_mount() already did this, I've just tidied it up a little more.) * remove the copyin*() stuff for `path'. `data' still requires copyin*() since its a pointer into userland. * set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each filesystem. This variable is generally initialised with `path', and each filesystem can override it if they want to. * NOTE: f_mntonname is intiailised with "/" in the case of a root mount.
* Display the Joliet Extension 'level' in the log message.alfred2001-02-231-1/+1
| | | | PR: kern/24998
* Back out proc locking to protect p_ucred for obtaining additionaljhb2001-01-271-15/+2
| | | | references along with the actual obtaining of additional references.
* Proc locking to protect p_ucred while we obtain additional references.jhb2001-01-241-2/+15
|
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-4/+2
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
OpenPOWER on IntegriCloud