summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs
Commit message (Collapse)AuthorAgeFilesLines
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-213-23/+23
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* 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
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-143-4/+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.
* - Remove a useless initialization for 'ronly', if it hadn't beenmux2002-10-131-2/+2
| | | | | there, we would have noticed that 'ronly' was uninitialized :-). - Kill a nearby 'register' keyword.
* Pass flags to VOP_CLOSE() corresponding to what was passed to VOP_OPEN().phk2002-10-131-0/+1
| | | | Submitted by: "Peter Edwards" <pmedwards@eircom.net>
* Rename struct specinfo to the more appropriate struct cdev.phk2002-09-271-1/+1
| | | | Agreed on: jake, rwatson, jhb
* Fix the problem introduced by vop_stdbmap() usage. The NTFS does notsemenu2002-09-251-1/+28
| | | | | | | | implement worthful VOP_BMAP() handler, so it expect the blkno not to be changed by VOP_BMAP(). Otherwise, it'll have to find some tricky way to determine if bp was VOP_BMAP()ed or not in VOP_STRATEGY(). PR: kern/42139
* - Use vrefcnt() where it is safe to do so instead of doing direct andjeff2002-09-252-3/+3
| | | | | | | 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-11/+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/+2
| | | | | | | | | | | | | | | - 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
* Fix a problem with sendfile() syscall by always doing I/O via bread() insemenu2002-07-311-13/+28
| | | | | | | | ntfs_read(). This guarantee that requested cache pages will be valid if UIO_NOCOPY specifed. PR: bin/34072, bin/36189 MFC after: 1 week
* More s/file system/filesystem/gtrhodes2002-05-162-4/+4
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-042-2/+2
| | | | | | | 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
* Remove __P.alfred2002-03-195-71/+69
|
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-173-10/+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.
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-1/+1
| | | | reference.
* Fix a BUF_TIMELOCK race against BUF_LOCK and fix a deadlock in vget()dillon2001-12-201-1/+1
| | | | | | | | against VM_WAIT in the pageout code. Both fixes involve adjusting the lockmgr's timeout capability so locks obtained with timeouts do not interfere with locks obtained without a timeout. Hopefully MFC: before the 4.5 release
* GC compat macros HASHINIT, VOP__LOCK, VOP__UNLOCK, VGET, and VN_LOCK.jhb2001-11-274-18/+12
|
* Expand LOCKMGR() compat macro.jhb2001-11-272-9/+11
|
* GC non-FreeBSD code that didn't work anyways.jhb2001-11-266-497/+2
|
* Missing KSE s/curproc/curthread/peter2001-11-171-1/+1
|
* Fix (typo? pasteo?): panic("ffs_mountroot..." -> panic("ntfs_mountroot...")fenner2001-09-261-1/+1
|
* KSE Milestone 2julian2001-09-124-56/+56
| | | | | | | | | | | | | | 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
* Stole unicode translation table from mount_msdos. Add kernel codesemenu2001-09-086-18/+137
| | | | | | to support this translation. MFC after: 2 weeks
* Fix opening particular file's attributes (as described in man page).semenu2001-09-081-9/+14
| | | | | | This is useful for debug purposes. MFC after: 2 weeks
* Reference devvp on ntnode creation and dereference on removal. Previoussemenu2001-09-083-22/+17
| | | | | | | code lead to page faults becouse i_devvp went zero after VOP_RECLAIM, but ntnode was reused (not reclaimed). MFC after: 2 weeks
* Fix errors and warnings when compiling with NTFS_DEBUG > 1semenu2001-09-082-6/+4
| | | | MFC after: 2 weeks
* Fix warning (exposed NetBSD code):peter2001-06-151-1/+1
| | | | 94: warning: `ntfs_bmap' declared `static' but never defined
* - sys/n[tw]fs moved to sys/fs/n[tw]fsru2001-05-265-21/+21
| | | | - /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs
* Change the second argument of vflush() to an integer that specifiesiedowse2001-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | 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-22/+0
| | | | | Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default.
* Add a vop_stdbmap(), and make it part of the default vop vector.phk2001-04-291-5/+2
| | | | | | Make 7 filesystems which don't really know about VOP_BMAP rely on the default vector, rather than more or less complete local vop_nopbmap() implementations.
* Move the netexport structure from the fs-specific mountstructurephk2001-04-252-11/+9
| | | | | | | | | | | | | | 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>
* This patch removes the VOP_BWRITE() vector.phk2001-04-171-1/+0
| | | | | | | | | | | | | VOP_BWRITE() was a hack which made it possible for NFS client side to use struct buf with non-bio backing. This patch takes a more general approach and adds a bp->b_op vector where more methods can be added. The success of this patch depends on bp->b_op being initialized all relevant places for some value of "relevant" which is not easy to determine. For now the buffers have grown a b_magic element which will make such issues a tiny bit easier to debug.
* Reviewed by: jlemonadrian2001-03-011-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Change and clean the mutex lock interface.bmilekic2001-02-093-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-5/+5
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Use <sys/queue.h> macro API.phk2001-02-041-1/+1
|
* Remove a DIAGNOSTIC check which belongs in <sys/queue.h> if anyplace at all.phk2001-02-041-4/+0
|
* Convert all simplelocks to mutexes and remove the simplelock implementations.jasone2001-01-241-10/+10
|
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-082-9/+6
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Use vop_defaultop() instead of ntfs_bypass().bp2000-11-181-2/+6
| | | | PR: kern/22756
* Missed conversion of CIRCLEQ => TAILQ for mount list.mckusick2000-11-141-1/+1
|
* Give vop_mmap an untimely death. The opportunity to give it a timelyeivind2000-11-011-1/+0
| | | | death timed out in 1996.
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-292-2/+0
|
* Blow away the v_specmountpoint define, replacing it with what it waseivind2000-10-091-3/+3
| | | | defined as (rdev->si_mountpoint)
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-046-11/+45
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* PDIRUNLOCK now exists on FreeBSD. Remove the (now incorrect) redefinition.peter2000-10-021-4/+0
|
OpenPOWER on IntegriCloud