summaryrefslogtreecommitdiffstats
path: root/sys/fs/hpfs/hpfs_vnops.c
Commit message (Collapse)AuthorAgeFilesLines
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.pjd2007-02-151-0/+20
| | | | | | | | | | | | | | | | This way we may support multiple structures in v_data vnode field within one file system without using black magic. Vnode-to-file-handle should be VOP in the first place, but was made VFS operation to keep interface as compatible as possible with SUN's VFS. BTW. Now Solaris also implements vnode-to-file-handle as VOP operation. VFS_VPTOFH() was left for API backward compatibility, but is marked for removal before 8.0-RELEASE. Approved by: mckusick Discussed with: many (on IRC) Tested with: ufs, msdosfs, cd9660, nullfs and zfs
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-5/+6
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* I ran into an nfs client panic a couple of times in a row over thealfred2006-01-171-1/+5
| | | | | | | | | | | | | | | | | | | | last few days. I tracked it down to the fact that nfs_reclaim() is setting vp->v_data to NULL _before_ calling vnode_destroy_object(). After silence from the mailing list I checked further and discovered that ufs_reclaim() is unique among FreeBSD filesystems for calling vnode_destroy_object() early, long before tossing v_data or much of anything else, for that matter. The rest, including NFS, appear to be identical, as if they were just clones of one original routine. The enclosed patch fixes all file systems in essentially the same way, by moving the call to vnode_destroy_object() to early in the routine (before the call to vfs_hash_remove(), if any). I have only tested NFS, but I've now run for over eighteen hours with the patch where I wouldn't get past four or five without it. Submitted by: Frank Mayhar Requested by: Mohan Srinivasan MFC After: 1 week
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-041-2/+2
|
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-4/+2
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* - Correct the dprintf format int the _lookup routine.jeff2005-03-281-1/+1
| | | | Spotted by: pjd
* - Garbage collect an unused variable.jeff2005-03-281-5/+1
|
* - hpfs_lookup() is no longer responsible for unlocking the dvp, this isjeff2005-03-281-11/+6
| | | | | | | handled in vfs_lookup.c. This code was missing PDIRUNLOCK use prior to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c. Sponsored by: Isilon Systems, Inc.
* Don't hold a reference on the disk vnode for each inode.phk2005-03-151-6/+0
|
* Use vfs_hash instead of home-rolled.phk2005-03-141-1/+2
|
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-131-2/+0
| | | | | | | | the filesystem. Check that rather than VI_XLOCK. - VOP_INACTIVE should no longer drop the vnode lock. - The vnode lock is required around calls to vrecycle() and vgone(). Sponsored by: Isilon Systems, Inc.
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Remove unused argument to vrecycle()phk2005-01-281-1/+1
|
* Whitespace in vop_vector{} initializations.phk2005-01-131-22/+22
|
* Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE()phk2005-01-111-1/+1
|
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-011-31/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* hpfs_lookup() should have a vop_cachedlookup_t prototype an correspondingphk2004-12-011-2/+2
| | | | argument.
* Mechanically change prototypes for vnode operations to use the new typedefs.phk2004-12-011-19/+19
|
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-151-3/+3
| | | | | | | | | instead of a vnode for it. The vnode_pager does not and should not have any interest in what the filesystem uses for backend. (vfs_cluster doesn't use the backing store argument.)
* Move HPFS to GEOM backing instead of DEVFS.phk2004-10-291-2/+3
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Eliminate unnecessary KASSERTs.phk2004-10-271-2/+0
| | | | Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument.
* Use bufdone(), not biodone().phk2004-08-081-2/+2
|
* Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This iscperciva2004-07-261-1/+1
| | | | | | | | | | | somewhat clearer, but more importantly allows for a consistent naming scheme for suser_cred flags. The old name is still defined, but will be removed in a few days (unless I hear any complaints...) Discussed with: rwatson, scottl Requested by: jhb
* DuH!phk2003-10-181-1/+1
| | | | | bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in the file)
* Initialize b_offset before calling VOP_STRATEGY/VOP_SPECSTRATEGY.phk2003-10-181-0/+1
| | | | | Remove various comments of KASSERTS and comments about B_PHYS which does not apply anymore.
* - Don't cache_purge() in *_reclaim routines. vclean() does it for us sojeff2003-10-051-1/+0
| | | | this is redundant.
* 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.
* - Add a new 'flags' parameter to getblk().jeff2003-03-041-1/+1
| | | | | | | | | | - Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT flag to the initial BUF_LOCK(). This will eventually be used in cases were we want to use a buffer only if it is not currently in use. - Convert all consumers of the getblk() api to use this extra parameter. Reviwed by: arch Not objected to by: mckusick
* Finish cleanup of vprint() which was begun with changing v_tag to a string.njl2003-03-031-1/+1
| | | | | | 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.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* - Cleanup unlocked accesses to buf flags by introducing a new b_vflag memberjeff2003-02-091-36/+3
| | | | | | | | | | that is protected by the vnode lock. - Move B_SCANNED into b_vflags and call it BV_SCANNED. - Create a vop_stdfsync() modeled after spec's sync. - Replace spec_fsync, msdos_fsync, and hpfs_fsync with the stdfsync and some fs specific processing. This gives all of these filesystems proper behavior wrt MNT_WAIT/NOWAIT and the use of the B_SCANNED flag. - Annotate the locking in buf.h
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | 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-3/+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
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-141-1/+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.
* Return ENOTTY when we don't recognize an ioctl.phk2002-09-261-1/+1
|
* - Use vrefcnt() where it is safe to do so instead of doing direct andjeff2002-09-251-4/+7
| | | | | | | unlocked accesses to v_usecount. - Lock access to the buf lists in the various sync routines. interlock locking could be avoided almost entirely in leaf filesystems if the fsync function had a generic helper.
* Remove any VOP_PRINT that redundantly prints the tag.njl2002-09-181-3/+1
| | | | | | 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-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)
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-041-2/+5
| | | | | | | | | | | | | | | - 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-2/+2
|
* HPFS picks up the vop_stdgetpages and vop_stdputpages member functionsphk2002-05-031-2/+0
| | | | via the default entry and the default vop vector.
* Remove 3 instances of vm_zone.h inclusion.phk2002-04-081-1/+0
|
* 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@
* Remove __P.alfred2002-03-191-21/+21
|
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-171-14/+12
| | | | | | | | | | | | 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.
* Introduce the new 64-bit size disk block, daddr64_t. Changemckusick2002-03-151-2/+6
| | | | | | | | | | | | the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses.
* Commit a know fix for hpfs to use vop_defaultop plug instead of wrongsemenu2002-01-141-13/+1
| | | | | | hpfs_bypass() routine. MFC after: 1 day
* Replace 'p' with 'td' as appropriate.jhb2001-11-271-4/+4
|
OpenPOWER on IntegriCloud