summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs/msdosfs_denode.c
Commit message (Collapse)AuthorAgeFilesLines
* - sys/msdosfs moved to sys/fs/msdosfsru2001-05-251-724/+0
| | | | | - msdos.ko renamed to msdosfs.ko - /usr/include/msdosfs moved to /usr/include/fs/msdosfs
* Revert consequences of changes to mount.h, part 2.grog2001-04-291-2/+0
| | | | Requested by: bde
* Correct #includes to work with fixed sys/mount.h.grog2001-04-231-0/+2
|
* Change and clean the mutex lock interface.bmilekic2001-02-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Convert all simplelocks to mutexes and remove the simplelock implementations.jasone2001-01-241-14/+12
|
* Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ingphk2000-10-291-1/+0
| | | | | | | | | | the offending inline function (BUF_KERNPROC) on it being #included already. I'm not sure BUF_KERNPROC() is even the right thing to do or in the right place or implemented the right way (inline vs normal function). Remove consequently unneeded #includes of <sys/proc.h>
* Remove de_lock field from denode structure and make msdosfs PDIRUNLOCK aware.bp2000-10-221-3/+4
|
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-041-2/+5
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Fix memory leakage on module unload.bp2000-06-291-0/+10
| | | | Spotted by: fixed INVARIANTS code
* 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
* Supported non-512 bytes/sector format.nyan2000-01-271-1/+1
| | | | | | | PR: misc/12992 Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) and Dmitrij Tejblum <tejblum@arc.hq.cti.ru> Reviewed by: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
* Ifdefed conditionally used simplock variables.bde1999-01-021-1/+3
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-4/+1
| | | | and local variables, goto labels, and functions declared but not defined.
* Support NT VFAT lower case flags.dt1998-11-211-1/+2
| | | | | PR: 8383 (Mostly) Submitted by: Carl Mascott <cmascott@world.std.com>
* add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE()peter1998-11-101-1/+2
|
* Use vtruncbuf() rather than vinvalbuf() when shortening files.peter1998-10-291-6/+9
|
* Removed unused includes.bde1998-08-171-2/+1
|
* Don't forget to clean up after an error reading the directory entrybde1998-05-171-3/+13
| | | | in deget().
* Removed vestiges of pre-Lite2 locking.bde1998-05-171-2/+1
|
* s/nanoruntime/nanouptime/gphk1998-05-171-2/+2
| | | | | | s/microruntime/microuptime/g Reviewed by: bde
* Time changes mark 2:phk1998-04-041-3/+5
| | | | | | | | | | | | | | | | | * Figure out UTC relative to boottime. Four new functions provide time relative to boottime. * move "runtime" into struct proc. This helps fix the calcru() problem in SMP. * kill mono_time. * add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!) * nanosleep, select & poll takes long sleeps one day at a time Reviewed by: bde Tested by: ache and others
* Add two new functions, get{micro|nano}time.phk1998-03-261-2/+2
| | | | | | | | | | | | They are atomic, but return in essence what is in the "time" variable. gettime() is now a macro front for getmicrotime(). Various patches to use the two new functions instead of the various hacks used in their absence. Some puntuation and grammer patches from Bruce. A couple of XXX comments.
* Deleted 1024bytes/sector floppy code for PC-98 arch. Thekato1998-03-201-8/+1
| | | | | 1024bytes/sector code has not worked for long time and it should be re-implemented.
* Update MSDOSFS code using NetBSD's msdosfs as a guide to supportjkh1998-02-181-168/+117
| | | | | | | | | | | FAT32 partitions. Unfortunately, we looked around here at Walnut Creek CDROM for any newer FAT32-supporting versions of Win95 and we were unsuccessful; only the older stuff here. So this is untested beyond simply making sure it compiles and someone with access to an actual FAT32 fs will have to let us know how well it actually works. Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> Obtained from: NetBSD
* Staticize.eivind1998-02-091-3/+3
|
* Back out DIAGNOSTIC changes.eivind1998-02-061-3/+1
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-1/+3
|
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-2/+2
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Distribute and statizice a lot of the malloc M_* types.phk1997-10-111-1/+3
| | | | Substantial input from: bde
* Removed unused #includes.bde1997-09-021-3/+1
|
* Back out some incorrect changes that was worse than the original bug.dyson1997-08-261-3/+1
|
* This is a trial improvement for the vnode reference count while on the vnodedyson1997-08-221-2/+4
| | | | | | free list problem. Also, the vnode age flag is no longer used by the vnode pager. (It is actually incorrect to use then.) Constructive feedback welcome -- just be kind.
* Updated msdosfs to use Lite2 vfs configuration and Lite2 locking. Itbde1997-02-261-39/+51
| | | | should now work as (un)well as before the Lite2 merge.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make this compile without warnings after the Lite2 merge:mpp1997-02-121-1/+2
| | | | | | | | | - *fs_init routines now take a "struct vfsconf * vfsp" pointer as an argument. - Use the correct type for cookies. - Update function prototypes. Submitted by: bde
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-4/+4
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* The Great PC98 Merge.asami1996-06-141-1/+8
| | | | | | | | All new code is "#ifdef PC98"ed so this should make no difference to PC/AT (and its clones) users. Ok'd by: core Submitted by: FreeBSD(98) development team
* Moved the fsnode MALLOC to before the call to getnewvnode() so that thedg1996-06-121-3/+9
| | | | | | | | process won't possibly block before filling in the fsnode pointer (v_data) which might be dereferenced during a sync since the vnode is put on the mnt_vnodelist by getnewvnode. Pointed out by Matt Day <mday@artisoft.com>
* Eliminated many redundant vm_map_lookup operations for vm_mmap.dyson1996-01-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish overhead for merged cache. Efficiency improvement for vfs_cluster. It used to do alot of redundant calls to cluster_rbuild. Correct the ordering for vrele of .text and release of credentials. Use the selective tlb update for 486/586/P6. Numerous fixes to the size of objects allocated for files. Additionally, fixes in the various pagers. Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs. Fixes in the swap pager for exhausted resources. The pageout code will not as readily thrash. Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE), thereby improving efficiency of several routines. Eliminate even more unnecessary vm_page_protect operations. Significantly speed up process forks. Make vm_object_page_clean more efficient, thereby eliminating the pause that happens every 30seconds. Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the case of filesystems mounted async. Fix a panic with busy pages when write clustering is done for non-VMIO buffers.
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+3
|
* Added prototypes.bde1995-12-031-1/+7
|
* Add support for the va_filerev attribute required by NFSv3.dfr1995-08-021-1/+20
|
* Remove trailing whitespace.rgrimes1995-05-301-21/+21
|
* Submitted by: Mike Pritchard <pritc003@maroon.tc.umn.edu>bde1995-04-111-8/+2
| | | | | | | | | | | | Fix PR 303: msdosfs: moving a file into another directory causes panic. " ... the code that does the rename already has the denode locked when msdosfs_hashins() gets called, resulting in the panic when the routine attempts to lock the denode again. ... The attached patch changes the msdosfs_hashins() routine to not lock the denode. The caller is now resposible for obtaining the lock instead of having msdosfs_hashins() do it for them."
* Removed bogus, commented out, call to vnode_pager_uncache().dg1995-03-191-2/+1
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-4/+1
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Kill the comment in a comment to shut up the compiler.ats1995-01-291-2/+2
|
OpenPOWER on IntegriCloud