summaryrefslogtreecommitdiffstats
path: root/sys/fs/cd9660
Commit message (Collapse)AuthorAgeFilesLines
* Do not call VOP_BMAP() on our own vnodes.phk2003-08-171-10/+3
| | | | It is particularly silly when all it does is a minor piece of math.
* 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.
* change dev_t to struct cdev * to match ufs. This fixes fstat for cd9660jmg2003-06-241-1/+1
| | | | | | and msdosfs. Reviewed by: bde
* Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementationsphk2003-06-151-0/+2
| | | | to check that the buffer points to the correct vnode.
* Initialize struct vfsops C99-sparsely.phk2003-06-121-14/+9
| | | | | Submitted by: hmp Reviewed by: phk
* Use __FBSDID().obrien2003-06-117-8/+21
|
* emove unused variable(s).phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* 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
* Finish cleanup of vprint() which was begun with changing v_tag to a string.njl2003-03-031-3/+0
| | | | | | Remove extraneous uses of vop_null, instead defering to the default op. Rename vnode type "vfs" to the more descriptive "syncer". Fix formatting for various filesystems that use vop_print.
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-021-25/+25
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-021-1/+1
|
* Back out M_* changes, per decision of the TRB.imp2003-02-192-6/+6
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-212-6/+6
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Temporarily introduce a new VOP_SPECSTRATEGY operation while I tryphk2003-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to sort out disk-io from file-io in the vm/buffer/filesystem space. The intent is to sort VOP_STRATEGY calls into those which operate on "real" vnodes and those which operate on VCHR vnodes. For the latter kind, the call will be changed to VOP_SPECSTRATEGY, possibly conditionally for those places where dual-use happens. Add a default VOP_SPECSTRATEGY method which will call the normal VOP_STRATEGY. First time it is called it will print debugging information. This will only happen if a normal vnode is passed to VOP_SPECSTRATEGY by mistake. Add a real VOP_SPECSTRATEGY in specfs, which does what VOP_STRATEGY does on a VCHR vnode today. Add a new VOP_STRATEGY method in specfs to catch instances where the conversion to VOP_SPECSTRATEGY has not yet happened. Handle the request just like we always did, but first time called print debugging information. Apart up to two instances of console messages per boot, this amounts to a glorified no-op commit. If you get any of the messages on your console I would very much like a copy of them mailed to phk@freebsd.org
* Since Jeffr made the std* functions the default in rev 1.63 ofphk2003-01-041-9/+0
| | | | | | | kern/vfs_defaults.c it is wrong for the individual filesystems to use the std* functions as that prevents override of the default. Found by: src/tools/tools/vop_table
* 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
* Fix comments and one resulting code confusion about the type of thephk2002-10-161-1/+1
| | | | | | "command" argument to VOP_IOCTL. Spotted by: FlexeLint.
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-142-7/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Change iov_base's type from `char *' to the standard `void *'. Allmike2002-10-111-1/+1
| | | | | uses of iov_base which assume its type is `char *' (in order to do pointer arithmetic) have been updated to cast iov_base to `char *'.
* Be consistent about "static" functions: if the function is markedphk2002-09-282-7/+7
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* - Use vrefcnt() instead of v_usecount.jeff2002-09-251-2/+2
|
* Remove any VOP_PRINT that redundantly prints the tag.njl2002-09-181-18/+3
| | | | | | Move lockmgr_printinfo() into vprint() for everyone's benefit. Suggested by: bde
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-142-2/+2
| | | | | | | | | | | | 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)
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-3/+3
|
* 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
* Quick fix for non-unique inode numbers for hard links. We use thebde2002-05-221-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | byte offset of the directory entry for the inode number for all types of files except directories, although this breaks hard links for non-directories even if it doesn't cause overflow. Just ignore this broken inode number for stat() and readdir() and return a less broken one (the block offset of the file), so that applications normally can't see the brokenness. This leaves at least the following brokenness: - extra inodes, vnodes and caching for hard links. - various overflow bugs. cd9660 supports 64-bit block numbers, but we silently ignore the top 32 bits in isonum_733() and then drop another 10 bits for our broken inode numbers. We may also have sign extension bugs from storing 32-bit extents in ints and longs even if ints are 32-bits. These bugs affect DVDs. mkisofs apparently limits them by writing directory entries first. Inode numbers were broken mainly in 4.4BSD-Lite2. FreeBSD-1.1.5 seems to have a correct implementation modulo the overflow bugs. We need to look up directory entries from inodes for symlinks only. FreeBSD-1.1.5 use separate fields (iso_parent_extent, iso_parent) to point to the directory entry. 4.4BSD-Lite doesn't have these, and abuses i_ino to point to the directory entry. Correct pointers are impossible for hard links, but symlinks can't be hard links.
* More s/file system/filesystem/gtrhodes2002-05-163-5/+5
|
* Include systm.h for panic(9) so that DEBUG_ALL_VFS_LOCKS compiles.jeff2002-05-042-0/+2
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* 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-243-8/+7
| | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting in some cases.
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-201-4/+4
|
* Remove __P.alfred2002-03-207-92/+82
|
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-175-16/+42
| | | | | | | | | | | | 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
* Fix the fix. BIO_ERROR must be set in b_ioflags, not b_flagsdillon2001-11-041-1/+1
|
* B_ERROR is BIO_ERROR on -current.phk2001-11-041-1/+1
| | | | Now it compiles, I don't know if it works.
* Fix a bug in CD9660 when vmiodirenable is turned on. CD9660 was assumingdillon2001-11-041-1/+23
| | | | | | | | | | | | | | that a buffer's b_blkno would be valid. This is true when vmiodirenable is turned off because the B_MALLOC'd buffer's data is invalidated when the buffer is destroyed. But when vmiodirenable is turned on a buffer can be reconstituted from its VMIO backing store. The reconstituted buffer will have no knowledge of the physical block translation and the result is serious directory corruption of the CDROM. The solution is to fix cd9660_blkatoff() to always BMAP the buffer if b_lblkno == b_blkno. MFC after: 0 days
* KSE Milestone 2julian2001-09-124-56/+55
| | | | | | | | | | | | | | 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
* - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION fileru2001-05-231-1/+1
| | | | | | | | | | | | | | | systems were repo-copied from sys/miscfs to sys/fs. - Renamed the following file systems and their modules: fdesc -> fdescfs, portal -> portalfs, union -> unionfs. - Renamed corresponding kernel options: FDESC -> FDESCFS, PORTAL -> PORTALFS, UNION -> UNIONFS. - Install header files for the above file systems. - Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland Makefiles.
* 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
* Implement vop_std{get|put}pages() and add them to the default vop[].phk2001-05-011-32/+0
| | | | | Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default.
* Uncut&paste som bogus use of VOP_BMAP in cd9660::VOP_STRATEGY.phk2001-04-301-10/+4
| | | | XXX mark some stuff which looks like further cut&paste junk.
* Revert consequences of changes to mount.h, part 2.grog2001-04-297-14/+0
| | | | Requested by: bde
* Move the netexport structure from the fs-specific mountstructurephk2001-04-252-29/+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-237-0/+14
|
OpenPOWER on IntegriCloud