summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* When pulling and unmounting an umass USB stick, the file systembluhm2016-03-271-4/+4
| | | | | | | | | | | | could end up in an inconsistent state. The fstype dependent mp->mnt_data was NULL, but the general mp was still listed as a valid mount point. Next access to the file system would crash with a NULL pointer dereference. If closing the device fails, the mount point must go away anyway. There is nothing we can do about it. Remove the workaround for the EIO error in the general unmount code, but do not generate any error in the file system specific unmount functions. OK natano@ beck@
* Remove the unused flags argument from VOP_UNLOCK().natano2016-03-194-27/+27
| | | | | | torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
* Set mnt_data to NULL after freeing the file system specific mount point.bluhm2016-03-171-3/+3
| | | | OK krw@ natano@ as part of a larger diff
* Change a bunch of (<blah> *)0 to NULL.krw2016-03-141-2/+2
| | | | ok beck@ deraadt@
* Guard against integer overflow when checking whetherstefan2016-02-051-2/+3
| | | | | | writing to a file on msdosfs stays within the max. file size. ok kettenis@, krw@
* Convert min + uiomovei to ulmin + uiomove.stefan2016-01-271-12/+10
| | | | From Martin Natano.
* Implement VFS read clustering for MSDOSFS.mpi2016-01-132-51/+71
| | | | | | | | | | | | | | | | | | | | | 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@
* Fix renaming in the root directory by correctly setting directorykrw2015-10-231-2/+3
| | | | | | | | | offset. From Serguey Parkhomovsky via bugs@, in response to problem report from matthieu@. Same fix is in NetBSD for one. ok tedu@
* Fix printf() types so kernel compiles with or w/o MSDOSFS_DEBUG.krw2015-10-235-32/+37
| | | | | e.g. print pointers with %p instead of %08x. No changes outside of MSDOSFS_DEBUG.
* Nuke a bunch of leading/embedded/trailing whitespace so the code can bekrw2015-10-2312-139/+139
| | | | read without generating spurious headaches.
* remove lockmgr_printinfo stubs. from Martin Natanotedu2015-09-231-2/+1
|
* Tweaks utimensat/futimens handling to always update ctime, even when bothguenther2015-04-171-4/+6
| | | | | | | atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Include sys/stdint.h for SIZE_MAX instead of relying on the misplacedmillert2015-02-131-1/+2
| | | | define in sys/limits.h. OK guenther@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-5/+5
| | | | | | | - rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
* rename desiredvnodes to initialvnodes. less of a lie. ok beck deraadttedu2015-01-091-2/+2
|
* Use <sys/endian.h> instead of <machine/endian.h>guenther2014-12-191-2/+2
| | | | ok dlg@ mpi@ bcook@ millert@ miod@
* primary change: move uvm_vnode out of vnode, keeping only a pointer.tedu2014-12-166-6/+12
| | | | | | objective: vnode.h doesn't include uvm_extern.h anymore. followup changes: include uvm_extern.h or lock.h where necessary. ok and help from deraadt
* More malloc() -> mallocarray() in the kernel.doug2014-12-091-2/+2
| | | | ok deraadt@ tedu@
* use siphash for key lookups in all the filesystem hashes.dlg2014-11-181-3/+21
| | | | ok deraadt@ tedu@
* include sys/unistd.h where needed instead of indirect reliance. ok jsgtedu2014-11-031-1/+2
|
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* fix kqueue read/write filters for msdosfs and fusefsjsg2014-08-101-7/+34
| | | | ok tedu@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-122-7/+7
| | | | after discussions with beck deraadt kettenis.
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-082-6/+2
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Fix possible crash on invalid filesystems.tobias2014-06-231-2/+3
| | | | | | Merged from FreeBSD's revision 206098. ok beck@
* Fix off by one in pm_inusemap.tobias2014-06-182-4/+4
| | | | | | | FreeBSD did this years ago in revision 126086 as pointed out by John-Mark Gurney on tech. Merge it and sync two occurrences. ok krw@
* Fix 'mount -ur' for msdosfssf2014-05-271-1/+7
| | | | | | | * fix bug preventing sync after more than one rw -> ro cycle. * sync data and not only metadata ok guenther@
* stop using B_AGE, it was effectively retired some time ago.tedu2014-05-091-2/+1
|
* disable IO_NOCACHE B_NOCACHE conversion until it works.tedu2014-05-091-1/+3
|
* msdosfs timestamps can only represent 1/1/1980 throughkrw2014-04-211-3/+12
| | | | | | | | | | 12/31/2107. 64-bit time_t now dominates that entire range, so simply set all dates that cannot be represented to 1/1/1980 like Redmond intended. Problem reported by Alessandro De Laurenzis via misc@. ok guenther@
* add IO_NOCACHE flag to vop_write arguments, which in turn sets B_NOCACHEbeck2014-04-081-1/+3
| | | | | | | on the written buffers. Use the flag for writes from the page daemon to ensure that we free buffers written out by the page daemon rather than caching them. ok kettenis@
* fix error checking oddity in msdosfs code, as noted by kettenis@halex2013-12-241-2/+2
| | | | ok mikeb@ espie@
* Zero out dirent structures that will be copied out to avoid leaking garbageguenther2013-12-141-2/+2
| | | | | | in the padding or trailing name bytes. ok beck@ millert@ espie@
* Format string fixes: %hu/%hd for uint16_t, %u/%d/%x for uint32_tsf2013-10-013-6/+6
| | | | | - despite the name, ntohl returns uint32_t, not long - also fix some %d into %u
* Correct the handling of I/O of >=2^32 bytes and the ktracing there ofguenther2013-09-141-2/+2
| | | | | | by using size_t/ssize_t instead of int/u_int to handle I/O lengths in uiomove(), vn_fsizechk(), and ktrgenio(). Eliminate the always-zero 'error' argument to ktrgenio() at the same time.
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-131-31/+7
| | | | | | | | | | | | | | | | | | | | members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-116-22/+22
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* revoke's default imp works.espie2013-05-231-2/+3
| | | | okay tedu@
* Add an f_mntfromspec member to struct statfs, which specifies the name ofjsing2013-04-151-4/+9
| | | | | | | | | | | | | the special provided when the mount was requested. This may be the same as the special that was actually used for the mount (e.g. in the case of a device node) or it may be different (e.g. in the case of a DUID). Whilst here, change f_ctime to a 64 bit type and remove the pointless f_spare members. Compatibility goo courtesy of guenther@ ok krw@ millert@
* Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,guenther2013-03-281-1/+4
| | | | | | | msdos, NFS, fifos and devices, plus support for querying it in getconf(2) and the requisite pathconf(2) manpage blurb ok tedu@
* Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,guenther2013-03-281-4/+1
| | | | | | | | | | | _PC_PRIO_IO, and _PC_SYNC_IO names in VOP_PATHCONF(), as they're fs-independent for us. Since we don't support latter three on any fs, we can also define the related _POSIX_{ASYNC,PRIO,SYNC}_IO symbols in <unistd.h> (via sys/unistd.h) with value -1. Also, zap pointless tty-only values from procfs(!). ok beck@, deraadt@
* Make the FAT setattr handling more consistent about unsupportedmartynas2013-01-151-42/+119
| | | | | attributes; making it more "user-friendly". Mostly from FreeBSD. OK guenther@, krw@.
* Cleanup VFS mount string handling:jsing2012-09-101-13/+10
| | | | | | | | | | | - Avoid using copyinstr() without checking the return value. - sys_mount() has already copied the path in, so pass this to the filesystem mount code so that it does not have to copy it in again. - Avoid copyinstr()/bzero() dance when we can simply bzero() and strlcpy(). ok krw@
* Remove the need to occasionally treat dos file names as strings bykrw2012-09-064-15/+17
| | | | | | | | | | | 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@.
* If the current offset is strictly less than the process filesizeguenther2012-07-111-12/+10
| | | | | | | rlimit, then a write that would take it over the limit should be clamped, making it a partial write. ok beck@
* Cleanup our filesystem pathconf() code a little bit to make it easiermatthew2012-06-201-8/+11
| | | | | | to diff against FreeBSD's. From Brad; no object file change on amd64.
* As it was made evident by Olaf 'Rhialto' Seibert in the NetBSD PR 34583,mikeb2012-04-052-3/+11
| | | | | | | 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.
* add kevent support for msdosfs to make applicationsrobert2012-02-161-2/+103
| | | | | | monitoring fs mounts happy tested by ajacoutot@ and ok by thib@, krw@
* move the specfs code to a place people can see it; ok guenther thib krwderaadt2011-07-042-4/+4
|