summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs/ntfs_subr.c
Commit message (Collapse)AuthorAgeFilesLines
* Revise and improve ntfs_subr.c 1.30: read only a single cluster at a timetjr2003-07-261-17/+20
| | | | | | | | | | in ntfs_writentvattr_plain and ntfs_readntvattr_plain, and purge the boot block from the buffer cache if isn't exactly one cluster long. These two changes work around the same buffer cache bug that ntfs_subr.c 1.30 tried to, but in a different way. This may decrease throughput by reading smaller amounts of data from the disk at a time, but may increase it by avoiding bogus writes of clean buffers. Problem (re)reported by Karel J. Bosschaart on -current.
* Merge from NetBSD src/sys/ntfs/ntfs_subr.c 1.5 & 1.30 (jdolecek):tjr2003-06-201-1/+15
| | | | | | | | | | | | - Avoid calling bread() with different sizes on the same blkno. Although the buffer cache is designed to handle differing size buffers, it erroneously tries to write the incorrectly-sized buffer buffer back to disk before reading the correctly-sized one, even when it's not dirty. This behaviour caused a panic for read-only NTFS mounts when INVARIANTS was enabled ("bundirty: buffer x still on queue y"), reported by NAKAJI Hiroyuki. - Fix a bug in the code handling holes: a variable was incremented instead of decremented, which could cause an infinite loop.
* - 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
* Back out M_* changes, per decision of the TRB.imp2003-02-191-19/+19
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-19/+19
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* 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.
* 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
* Remove __P.alfred2002-03-191-4/+4
|
* Add a flags parameter to VFS_VGET to pass through the desiredmckusick2002-03-171-1/+1
| | | | | | | | | | | | 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.
* Expand LOCKMGR() compat macro.jhb2001-11-271-8/+11
|
* GC non-FreeBSD code that didn't work anyways.jhb2001-11-261-21/+0
|
* Missing KSE s/curproc/curthread/peter2001-11-171-1/+1
|
* KSE Milestone 2julian2001-09-121-1/+1
| | | | | | | | | | | | | | 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-081-16/+107
| | | | | | 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-081-17/+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-081-2/+2
| | | | MFC after: 2 weeks
* - sys/n[tw]fs moved to sys/fs/n[tw]fsru2001-05-261-7/+7
| | | | - /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs
* Change and clean the mutex lock interface.bmilekic2001-02-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-7/+5
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* 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>.
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-041-7/+21
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-051-0/+1
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Merged NetBSD version, as they have done improvements:semenu1999-12-031-476/+572
| | | | | | | | | | | 1. ntfs_read*attr*() functions now accept uio structure to eliminate one data copying. 2. found and removed deadlock caused by 6 concurent ls -lR. 3. started implementation of nromal Unicode<->unix recodeing. Obtained from: NetBSD
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,phk1999-08-081-3/+1
| | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
* Driver is now ported to NetBSD.semenu1999-05-121-11/+15
| | | | Submitted by: Christos Zoulas <christos@zoulas.com>
* Removed annoying messaged during boot,added some checksemenu1999-04-201-62/+256
| | | | | | | | before mounting (should help to do not mount extended partitions:-). Fixed problem with hanging while unmounting busy fs. And (the most important) added some locks to prevent simulaneous access to kernel structures!
* Added limited write ability. Now we can use some kindsemenu1999-02-191-184/+437
| | | | of files for swap holders. See mount_ntfs..8 for details.
* First version.semenu1999-02-031-0/+1450
Reviewed by: David O'Brien <obrien@NUXI.com>
OpenPOWER on IntegriCloud