summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs/denode.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a dedicated entry point data structure for file locks. This new dataanton2019-01-211-2/+2
| | | | | | | | | | | | structure allows for better tracking of pending lock operations which is essential in order to prevent a use-after-free once the underlying vnode is gone. Inspired by the lockf implementation in FreeBSD. ok visa@ Reported-by: syzbot+d5540a236382f50f1dac@syzkaller.appspotmail.com
* Implement VFS read clustering for MSDOSFS, take 3.mpi2018-05-071-2/+1
| | | | With sf@, inputs from krw@, tested by many, ok visa@
* Revert 'Implement VFS read clustering for MSDOSFS' againsf2017-06-131-1/+2
| | | | | | | | | | | This has again caused regressions, this time when reading from msdosfs. This reverts denode.h 1.31 msdosfs_vnops.c 1.114 Requested by deraadt@
* Implement VFS read clustering for MSDOSFSsf2017-05-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the reverted commit by mpi@ from msdosfs_vnops.c 1.105 plus some additional tweaks to fix some cluster/block number confusion that lead to regressions when seeking past the end of a file. The original commit message was: The logic used in msdosfs_bmap() to loop calling pcbmap() comes from FreeBSD and is not really efficient but it is good enough since it is only called when generating I/O. With this diff I get a 100% improvement when reading big files from a crappy USB stick. With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers, reading large contiguous files with chunk sizes of MAXPHYS is almost as fast as physio(9) on the same device. For a 'real world' example, when copying music files from a USB stick I see a speed jump from 15MB/s on -current to 24Mb/s with this diff. While here rename some 'lbn' variables into 'cn' to better reflect what we're dealing with. Tested by Mathieu, with support from deraadt@ ok mpi@
* Revert "Implement VFS read clustering for MSDOSFS"sf2016-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused garbage to be written instead of blocks of 0-bytes if a file is extended by seeking past the end. This happens for example when extracting files containing lots of 0-bytes with tar. ok mpi@ Details of original commit: msdosfs_vnops.c revision 1.105 denode.h revision 1.28 date: 2016/01/13 10:00:55; author: mpi; commitid: ru9jHQwQX09BC5Bw; Implement VFS read clustering for MSDOSFS. The logic used in msdosfs_bmap() to loop calling pcbmap() comes from FreeBSD and is not really efficient but it is good enough since it is only called when generating I/O. With this diff I get a 100% improvement when reading big files from a crappy USB stick. With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers, reading large contiguous files with chunk sizes of MAXPHYS is almost as fast as physio(9) on the same device. For a 'real world' example, when copying music files from a USB stick I see a speed jump from 15MB/s on -current to 24Mb/s with this diff. While here rename some 'lbn' variables into 'cn' to better reflect what we're dealing with. Tested by Mathieu, with support from deraadt@
* Remove the lockmgr() API. It is only used by filesystems, where it is anatano2016-06-191-2/+2
| | | | | | | | trivial change to use rrw locks instead. All it needs is LK_* defines for the RW_* flags. tested by naddy and sthen on package building infrastructure input and ok jmc mpi tedu
* Implement VFS read clustering for MSDOSFS.mpi2016-01-131-2/+1
| | | | | | | | | | | | | | | | | | | | | The logic used in msdosfs_bmap() to loop calling pcbmap() comes from FreeBSD and is not really efficient but it is good enough since it is only called when generating I/O. With this diff I get a 100% improvement when reading big files from a crappy USB stick. With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers, reading large contiguous files with chunk sizes of MAXPHYS is almost as fast as physio(9) on the same device. For a 'real world' example, when copying music files from a USB stick I see a speed jump from 15MB/s on -current to 24Mb/s with this diff. While here rename some 'lbn' variables into 'cn' to better reflect what we're dealing with. Tested by Mathieu, with support from deraadt@
* Nuke a bunch of leading/embedded/trailing whitespace so the code can bekrw2015-10-231-5/+5
| | | | read without generating spurious headaches.
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-111-2/+2
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* Remove the need to occasionally treat dos file names as strings bykrw2012-09-061-2/+2
| | | | | | | | | | | using "%.11s" to print them out. Make all dos file names 11 byte arrays and nuke the attempt to put '\0' at the 12th position of such an array. Fixes 'panic: smashed stack in msdosfs_rename.c' reported by MERHIGI Marcus via tech@. Tested by MERHIGI Marcus. Suggestions and ok tedu@.
* As it was made evident by Olaf 'Rhialto' Seibert in the NetBSD PR 34583,mikeb2012-04-051-2/+3
| | | | | | | caching the last cluster in the file before extending it considerably speeds up further lookups. As a consequence this keeps write speed from gradually decreasing and provides a measurable (up to 2x) performance increase. Prompted by the diff from Alexander Polakov, ok miod, krw.
* Move some macros in <msdosfs/denode.h> to outside the #ifdef _KERNELguenther2010-07-171-3/+3
| | | | | | so that libkvm doesn't need to define that, thereby avoiding some warnings. ok miod@
* Make the DE_INTERNALIZE/EXTERNALIZE macros copy to/from the structnicm2010-05-161-3/+5
| | | | | | | direntry deName[8]/deExtension[3] buffers separately rather than in one 11 byte copy. Makes gcc4 -Wbounded happy. ok krw
* convert all daddr_t types to either daddr64_t or uint32_t or other suchderaadt2007-06-021-2/+2
| | | | things based on their use. ok with fixes from tom, tested by grange too
* get rid of noop vop_reallocblks; pedro@ miod@ okmickey2007-03-181-2/+1
|
* Retire VOP_LEASE(); It was a bit for NQNFS and hasthib2007-01-161-7/+1
| | | | | | | | | 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)
* The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, sotom2005-03-011-1/+4
| | | | | | | | | | 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@
* use pool for namei pathbuf. testing ok millert@ tdeval@tedu2004-05-141-1/+1
|
* 32 bit ints are uint32_t, not u_long. works on 64bit now. ok deraadt@tedu2004-05-121-16/+16
|
* Replace select backends with poll backends. selscan() and pollscan()millert2003-09-231-2/+2
| | | | | | | 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
* don't write grabage in unused direntry field. newer windows versionstedu2003-08-141-4/+3
| | | | don't like it. pr3400
* First round of __P removal in sysmillert2002-03-141-47/+47
|
* UBC was a disaster. It worked very good when it worked, but on someart2001-12-191-5/+1
| | | | | | | | | machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
* Big cleanup inspired by NetBSD with some parts of the code from NetBSD.art2001-12-101-1/+5
| | | | | | | | - get rid of VOP_BALLOCN and VOP_SIZE - move the generic getpages and putpages into miscfs/genfs - create a genfs_node which must be added to the top of the private portion of each vnode for filsystems that want to use genfs_{get,put}pages - rename genfs_mmap to vop_generic_mmap
* Get rid of several vnode operationscsapuntz2001-06-231-4/+1
|
* Remove the clustering fields from the vnodes and place them in thecsapuntz2001-02-231-1/+2
| | | | file system inode instead
* There is no msdosfs_abortop. Remove prototype.art1999-11-171-2/+1
|
* FAT32 support from NetBSD by Wolfgang Solfrank.provos1998-01-111-18/+20
|
* Updates for VFS Lite 2 + soft update.csapuntz1997-11-061-5/+2
|
* cleanup timestamp code for NT/Win95; khym@bga.comderaadt1997-10-041-6/+11
|
* Sync msdosfs with NetBSD sans const-ness. NetSBD log messages:millert1997-03-021-15/+13
| | | | | | | Fix panic on mkdir. Thanks to Dave Huang for finding the bug. Fixes a bug with allowed/forbidden characters in non-W95 filenames. Don't extend directory when nothing is written to it.
* From NetBSD: merge with 960217niklas1996-02-291-39/+43
|
* from netbsd (mostly by ws):deraadt1995-12-141-22/+50
| | | | | | | | | | | | | | | Win95 ignores case on lookup Really don't generate long names when mounted with -s Fix cookie handling Don't forward credentials to bread, it makes nfs panic (Of course, nfs shouldn't rely on the credentials not being referenced) Don't give directory entry to deget, it could result in a deadlock Use device blocks, not clusters for logical block numbers Add support for Win'95 separate creation/modification/access timestamps Re-introduce lowercase filenames for non-Win'95-filesystems Fix thinko with block boundaries in directories Don't overwrite dirclust, it's needed later on Enable flock(2).
* initial import of NetBSD treederaadt1995-10-181-0/+283