summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused variable(s).phk2003-05-311-6/+0
| | | | Found by: FlexeLint
* Fail to mount a device if the bytes per sector in the BPB is less thanjhb2003-04-241-0/+6
| | | | DEV_BSIZE or if the number of FAT sectors is zero.
* It appears that msdosfs_init() is called multiple times. This happensimp2003-04-101-0/+13
| | | | | | on my system where I preload msdosfs and have it in my kernel. There's likely another bug that's causing msdosfs_init() to be called multiple times, but this makes that harmless.
* - Add a new 'flags' parameter to getblk().jeff2003-03-042-7/+10
| | | | | | | | | | - 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.
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-021-14/+14
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-021-4/+2
|
* Back out M_* changes, per decision of the TRB.imp2003-02-193-4/+4
| | | | Approved by: trb
* - Cleanup unlocked accesses to buf flags by introducing a new b_vflag memberjeff2003-02-091-37/+4
| | | | | | | | | | 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
* Split the global timezone structure into two integer fields tophk2003-02-031-2/+2
| | | | | | | | | | prevent the compiler from optimizing assignments into byte-copy operations which might make access to the individual fields non-atomic. Use the individual fields throughout, and don't bother locking them with Giant: it is no longer needed. Inspired by: tjr
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-213-4/+4
| | | | 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
* Abstract-out the constants for the sequential heuristic.dillon2002-12-281-1/+1
| | | | | | No operational changes. MFC after: 1 day
* Fix instances of macros with improperly parenthasized arguments.alfred2002-11-091-2/+2
| | | | Verified by: md5
* Fix winChkName() to match when the last slot contains nothing but thesemenu2002-10-291-1/+8
| | | | | | | | terminating zero (it was treated as length missmatch). The mtools create such slots if the name len is the product of 13 (max number of unicode chars fitting in directory slot). MFC after: 1 week
* Grrr, s/PBP/BPB/ here as well.jhb2002-10-211-1/+1
| | | | Noticed by: peter
* Spell the BPB member of the 7.10 bootsector as bsBPB rather than bsPBP tojhb2002-10-211-1/+1
| | | | be like all the other bootsectors. Apple has done the same it seems.
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-141-3/+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.
* - Use vrefcnt() where it is safe to do so instead of doing direct andjeff2002-09-253-11/+15
| | | | | | | 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-6/+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-143-5/+5
| | | | | | | | | | | | 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)
* Fixed printf format errors and style bugs in rev.1.92. This is the versionbde2002-08-251-2/+3
| | | | that should have been committed in rev.1.93.
* Oops, the previous commit wasn't the version that I meant to commit (itbde2002-08-251-78/+9
| | | | does some extra things which are probably harmless). Back it out.
* Fixed printf format errors and style bugs in previous commit.bde2002-08-251-9/+78
|
* Fix a bug where large msdos partitions were not handled correctly, and fixtrhodes2002-08-221-1/+7
| | | | | | | | a few fsck_msdosfs related 'issues' PR: 28536, 30168 Submitted by: Jiangyi Liu <jyliu@163.net> && NetBSD Approved by: rwatson (mentor)
* When a cluster entry for ``.'' is set to 0, msdosfs fails to handle ittrhodes2002-08-161-0/+11
| | | | | | | | | correctly. PR: 24393 Submitted by: semenu Approved by: rwatson (mentor) MFC after: 1 week
* Introduce typedefs for the member functions of struct vfsops and employphk2002-08-131-10/+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.
* Fix typo in vnode flags causing deadlock in msdosfs_fsync().pb2002-08-051-1/+1
| | | | Reviewed by: jeff
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-044-8/+14
| | | | | | | | | | | | | | | - 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-164-9/+9
|
* Make daddr_t and u_daddr_t 64bits wide.phk2002-05-141-2/+2
| | | | | | Retire daddr64_t and use daddr_t instead. Sponsored by: DARPA & NAI Labs.
* Fixed a very old bug in setting timestamps using utimes(2) on msdosfsbde2002-04-051-4/+11
| | | | | | | | | | | | | | | files. We didn't clear the update marks when we set the times, so some of the settings were sometimes clobbered with the current time a little later. This caused cp -p even by root to almost always fail to preserve any times despite not reporting any errors in attempting to preserve them. Don't forget to set the archive attribute when we set the read-only attribute. We should only set the archive attribute if we actually change something, but we mostly don't bother avoiding setting it elsewhere, so don't bother here yet. MFC after: 1 week
* 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-012-7/+7
| | | | | | | | | | | | 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@
* Fixed some style bugs in the removal of __P(()). Continuation linesbde2002-03-232-14/+14
| | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting.
* Remove __P.alfred2002-03-199-91/+89
|
* Introduce the new 64-bit size disk block, daddr64_t. Changemckusick2002-03-152-7/+17
| | | | | | | | | | | | 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.
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-3/+3
| | | | 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
* Fix indentation after removing GEMDOS support. Whitespace changes only.jhb2001-11-281-14/+14
|
* Use suser_td() instead of explicitly checking cr_uid against 0.jhb2001-11-282-3/+3
| | | | | | PR: kern/21809 Submitted by: <mbendiks@eunet.no> Reviewed by: rwatson
* Axe more unused GEMDOS code that was #ifdef atari.jhb2001-11-284-44/+1
| | | | | PR: kern/21809 Submitted by: <mbendiks@eunet.no>
* Remove GEMDOS support from msdosfs. I don't think anyone is going tojhb2001-11-272-130/+0
| | | | port FreeBSD to Atari machines any time soon.
* Add mnt_reservedvnlist so we can MFC to 4.x, in order to make all mountdillon2001-11-041-0/+1
| | | | | | | | structure changes now rather then piecemeal later on. mnt_nvnodelist currently holds all the vnodes under the mount point. This will eventually be split into a 'dirty' and 'clean' list. This way we only break kld's once rather then twice. nvnodelist will eventually turn into the dirty list and should remain compatible with the klds.
* Change the vnode list under the mount point from a LIST to a TAILQdillon2001-10-231-3/+3
| | | | | | in preparation for an implementation of limiting code for kern.maxvnodes. MFC after: 3 days
* KSE Milestone 2julian2001-09-125-112/+112
| | | | | | | | | | | | | | 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
* remove support for creating files and directories from msdosfs_mknodassar2001-07-191-14/+1
|
* Fix a mntvnode and vnode interlock reversal.jhb2001-06-281-2/+3
|
* - VFS_SET(msdos) -> VFS_SET(msdosfs)ru2001-06-011-1/+1
| | | | | | - msdos.ko -> msdosfs.ko - mount_msdos(8) -> mount_msdosfs(8) - "msdos" -> "msdosfs" compatibility glue in mount(8)
OpenPOWER on IntegriCloud