summaryrefslogtreecommitdiff
path: root/sys/msdosfs
AgeCommit message (Collapse)Author
2007-06-02convert all daddr_t types to either daddr64_t or uint32_t or other suchTheo de Raadt
things based on their use. ok with fixes from tom, tested by grange too
2007-06-01pedro ok'd this ~3500 line diff which removes the vop argumentTheo de Raadt
"ap = v" comments in under 8 seconds, so it must be ok. and it compiles too.
2007-04-11Remove the simplelock argument from vrecycle();Thordur I. Bjornsson
ok pedro@, sturm@
2007-04-10When doing a rename and finding out the destination name alreadyPedro Martelletto
exists, keep the containing directory's long name capabilities. From NetBSD via Enache Adrian, okay millert@.
2007-04-02When running out of space to place a directory entry in msdosfs_readdir(),Pedro Martelletto
save the correct offset in case the directory has support for long file names, and return it to the caller so she can proceed from a valid point. From Alexey Vatchenko, okay tedu@.
2007-03-21Remove the v_interlock simplelock from the vnode structure.Thordur I. Bjornsson
Zap all calls to simple_lock/unlock() on it (those calls are #defined away though). Remove the LK_INTERLOCK from the calls to vn_lock() and cleanup the filesystems wich implement VOP_LOCK(). (by remvoing the v_interlock from there calls to lockmgr()). ok pedro@, art@, tedu@
2007-03-18get rid of noop vop_reallocblks; pedro@ miod@ okMichael Shalayeff
2007-01-16Retire VOP_LEASE(); It was a bit for NQNFS and hasThordur I. Bjornsson
effectively been a no-op for quite some time now, without promise for future usage. ok pedro@ Testing by krw@ (earlier diff) and Johan Mson Lindman (tybollt@solace.miun.se)
2006-12-16Adopt FreeBSD's code for non-DEV_BSIZE formatted MSDOSFS filesystems.Kenneth R Westerback
Enables devices (e.g. newer iPods, various other mp3 players) that use 2048 byte sectors. Inspired by original diffs from weingart@ and Alexey Vatchenk. ok tom@ pedro@ deraadt@ weingart@ marco@
2006-12-15Nuke GEMDOSFS. Unused part of unused atari port. SimplifiesKenneth R Westerback
MSDOSFS code. Eliminates -G option to mount_msdos. Nit detection by gwk@, tom@, jmc@. ok weingart@ tom@ thib@ dlg@ deraadt@
2006-12-14Remove dirsperblk, which is not used after it is calculated.Tom Cosgrove
ok weingart@ pedro@
2006-12-14If an MS-DOS filesystem claims to have more clusters than can beTom Cosgrove
represented in the FAT, limit the number of clusters we work with to the FAT value. This stops corrupt filesystems causing us to run off the end of the FAT and panic()ing in fillinusemap(). Found by Jason Crawford (jasonrcrawford at gmail.com) with the MOKB fs fuzzer. Initial debugging by thib@. ok krw@
2006-11-29detect potential multiplicative overflow before allocation, and return viaTheo de Raadt
the error path; ok pedro
2006-11-26Fix malloc() panic in msdosfs_mountfs(), okay thib@ deraadt@Pedro Martelletto
Found using fuzz generator written by lmh@info-pull.com
2006-10-16Use daddr64_t for logical blocks, okay krw@ thib@ mickey@Pedro Martelletto
2006-10-03Introduce daddr64_t and use it for physical block numbersPedro Martelletto
Okay weingart@, "I'm game with putting my name on it" dlg@
2006-08-22remove the check for the number of heads reported by the BPB altogether,Nikolay Sturm
there are devices reporting zero heads; we don't use this value anyways ok pedro, reported by Igor Grabin <violent at death.kiev.ua>
2006-08-07Revert last commitPedro Martelletto
2006-08-06obey the locking disaplince wrt to VOP_CLOSE during umountsThordur I. Bjornsson
and mount error paths. ok sturm@ pedro@
2006-07-19from FreeBSD:Nikolay Sturm
Don't reject FAT file systems with a number of "Heads" greater than 255; USB keychains exist that use 256 as the number of heads. This check has also been removed in Darwin (along with most of the other head/sector sanity checks). this fixes pr 4988, ok pedro
2006-01-09Put vprint() under DIAGNOSTIC, as to save space in generated ramdisks.Pedro Martelletto
Inspiration from miod@, okay deraadt@. Tested on i386, macppc and amd64.
2005-12-01Add missing cache_purge() in msdosfs_rename().Pedro Martelletto
Spotted by tedu@, okay tom@ and tedu@.
2005-11-19Remove unnecessary lockmgr() archaism that was costing too much in termsPedro Martelletto
of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
2005-10-08When moving a directory to under a new parent, write the correctTom Cosgrove
cluster number into our . pointer. This fixes filesystem corruption seen under these circumstances. Testing nick@, krw@, ian@ and others - thanks. "i agree" pedro@; "get it in" deraadt@
2005-09-28No part of the code defines UNALIGNED_ACCESS, use reverted tests forMiod Vallat
__STRICT_ALIGNMENT instead. Help pedro@ deraadt@, ok deraadt@
2005-03-14Fix typo in commentTom Cosgrove
2005-03-02(And remember to remove the block on filesystems > 128 GB)Tom Cosgrove
Add support for MS-DOS filesystems > 128 GB, by changing the way we calculate fileids (fake inode numbers). This uses some hash code by Thomas Wang, who has agreed to the existing licence on the file (i.e. his name just needed to be added to the copyright list). Thanks. Also a tiny bit of KNF. Closes PR 4119; works for the OP Pawel Rogocz. Help with testing todd@, thanks. ok deraadt@
2005-03-02Add support for MS-DOS filesystems > 128 GB, by changing the way weTom Cosgrove
calculate fileids (fake inode numbers). This uses some hash code by Thomas Wang, who has agreed to the existing licence on the file (i.e. his name just needed to be added to the copyright list). Thanks. Also a tiny bit of KNF. Closes PR 4119; works for the OP Pawel Rogocz. Help with testing todd@, thanks. ok deraadt@
2005-03-02Make all the MS-DOS filesystem code ignore trailing dots and spaces, inTom Cosgrove
the same way that Windows does. Without this, `touch .foobar.' followed by `touch .foobar.' will create two directory entries called `.foobar', thereby corrupting the filesystem. Found by todd@, who has been doing things with msdosfs that are truly obscene. "alright" tedu@, ok deraadt@
2005-03-01Fix an integer overflow that prevented us from reading files >= 2 GBTom Cosgrove
from MS-DOS filesystems. Assistance otto@; thanks. "looks ok" krw@; ok derradt@.
2005-03-01The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, soTom Cosgrove
don't bother trying to write files bigger than this. Just return EFBIG to caller, rather than panic()ing later. Closes PR 4090. Assistance from otto@, tested by OP and moritz@; thanks. ok tedu@ deraadt@
2004-12-26Use list and queue macros where applicable to make the code easier to read;Miod Vallat
no change in compiler assembly output.
2004-11-30kill breada(), from Sven Dehmlow. ok tedu@ millert@Pedro Martelletto
2004-11-29Don't use seltrue() in poll ops since it requires v_rdev dereferencingAlexander Yurchenko
which is not possible here. Problem found and fixed by form@. ok millert@ fgsch@ pedro@
2004-09-18hierarchy is spelled hierarchy, from Jonathan GrayTed Unangst
2004-06-24This moves access to wall and uptime variables in MI code,Thorsten Lockert
encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
2004-05-16remove printfs i left in. noticed by marc@Ted Unangst
2004-05-14use pool for namei pathbuf. testing ok millert@ tdeval@Ted Unangst
2004-05-1232 bit ints are uint32_t, not u_long. works on 64bit now. ok deraadt@Ted Unangst
2004-03-31Fix false positives when comparing long file names that have theTodd C. Miller
same first 13 (or some multiple thereof) characters. Fix was verified by reporter (Kong Long); from NetBSD
2003-12-10fix NULL/0 mixupJun-ichiro itojun Hagino
2003-12-04TyposMiod Vallat
2003-11-13Couple of typos in poll changes. ok millert@Dale Rahn
2003-10-22from netbsd:Ted Unangst
Fix a panic that occurred when trying to traverse a corrupt msdosfs filesystem. With this particular corruption, the code in pcbmap() would compute an offset into an array that was way out of bounds, so check the bounds before trying to access and return an error if the offset would be out of bounds.
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-08-14don't write grabage in unused direntry field. newer windows versionsTed Unangst
don't like it. pr3400
2003-08-14constify vfsops; tedu@ okMichael Shalayeff
2003-07-29constify the conversion tablesMichael Shalayeff
2003-05-07string cleaning; ok art teduTheo de Raadt