summaryrefslogtreecommitdiff
path: root/sys/msdosfs
AgeCommit message (Collapse)Author
2014-06-18Fix off by one in pm_inusemap.Tobias Stoeckmann
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@
2014-05-27Fix 'mount -ur' for msdosfsStefan Fritsch
* fix bug preventing sync after more than one rw -> ro cycle. * sync data and not only metadata ok guenther@
2014-05-09stop using B_AGE, it was effectively retired some time ago.Ted Unangst
2014-05-09disable IO_NOCACHE B_NOCACHE conversion until it works.Ted Unangst
2014-04-21msdosfs timestamps can only represent 1/1/1980 throughKenneth R Westerback
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@
2014-04-08add IO_NOCACHE flag to vop_write arguments, which in turn sets B_NOCACHEBob Beck
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@
2013-12-24fix error checking oddity in msdosfs code, as noted by kettenis@Alexander Hall
ok mikeb@ espie@
2013-12-14Zero out dirent structures that will be copied out to avoid leaking garbagePhilip Guenther
in the padding or trailing name bytes. ok beck@ millert@ espie@
2013-10-01Format string fixes: %hu/%hd for uint16_t, %u/%d/%x for uint32_tStefan Fritsch
- despite the name, ntohl returns uint32_t, not long - also fix some %d into %u
2013-09-14Correct the handling of I/O of >=2^32 bytes and the ktracing there ofPhilip Guenther
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.
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
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@
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-05-23revoke's default imp works.Marc Espie
okay tedu@
2013-04-15Add an f_mntfromspec member to struct statfs, which specifies the name ofJoel Sing
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@
2013-03-28Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,Philip Guenther
msdos, NFS, fifos and devices, plus support for querying it in getconf(2) and the requisite pathconf(2) manpage blurb ok tedu@
2013-03-28Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,Philip Guenther
_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@
2013-01-15Make the FAT setattr handling more consistent about unsupportedMartynas Venckus
attributes; making it more "user-friendly". Mostly from FreeBSD. OK guenther@, krw@.
2012-09-10Cleanup VFS mount string handling:Joel Sing
- 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@
2012-09-06Remove the need to occasionally treat dos file names as strings byKenneth R Westerback
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@.
2012-07-11If the current offset is strictly less than the process filesizePhilip Guenthe
rlimit, then a write that would take it over the limit should be clamped, making it a partial write. ok beck@
2012-06-20Cleanup our filesystem pathconf() code a little bit to make it easierMatthew Dempsky
to diff against FreeBSD's. From Brad; no object file change on amd64.
2012-04-05As it was made evident by Olaf 'Rhialto' Seibert in the NetBSD PR 34583,Mike Belopuhov
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.
2012-02-16add kevent support for msdosfs to make applicationsRobert Nagy
monitoring fs mounts happy tested by ajacoutot@ and ok by thib@, krw@
2011-07-04move the specfs code to a place people can see it; ok guenther thib krwTheo de Raadt
2011-07-04bread does nothing with its ucred argument. remove it. ok matthewTed Unangst
2011-04-05Every single vop_default is set to eopnotsupp, so retire itThordur I. Bjornsson
and return EOPNOTSUPP directly from the VOP_* functions. Filesystems should, at some point fill in every function in the vop_default struct so we can get rid of the 'if' statements in VOP_*.
2010-12-21Bring back the "End the VOP experiment." diff, naddy's issues whereThordur I. Bjornsson
unrelated, and his alpha is much happier now. OK deraadt@
2010-11-17Teach msdosfs_mount() how to handle disklabel UIDs.Joel Sing
2010-10-27improve the look of a for loopTheo de Raadt
2010-09-23Change:Owain Ainsworth
/* something */ if (error) { VOP_UNLOCK(); return; } VOP_UNLOCK(); to the clearer and shorter: VOP_UNLOCK(); if (error) return; ok thib@, jsing@ as part of a larger diff.
2010-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
2010-09-09Rename lookup/relookup to vfs_lookup/vfs_relookup.Thordur I. Bjornsson
OK oga@, beck@, matthew@
2010-09-06End the VOP experiment. Instead of the ridicolusly complicated operationThordur I. Bjornsson
vector setup that has questionable features (that have, as far as I can tell never been used in practice, atleast not in OpenBSD), remove all the gunk and favor a simple struct full of function pointers that get set directly by each of the filesystems. Removes gobs of ugly code and makes things simpler by a magnitude. The only downside of this is that we loose the vnoperate feature so the spec/fifo operations of the filesystems need to be kept in sync with specfs and fifofs, this is no big deal as the API it self is pretty static. Many thanks to armani@ who pulled an earlier version of this diff to current after c2k10 and Gabriel Kihlman on tech@ for testing. Liked by many. "come on, find your balls" deraadt@.
2010-07-17Move some macros in <msdosfs/denode.h> to outside the #ifdef _KERNELPhilip Guenthe
so that libkvm doesn't need to define that, thereby avoiding some warnings. ok miod@
2010-05-16Make the DE_INTERNALIZE/EXTERNALIZE macros copy to/from the structNicholas Marriott
direntry deName[8]/deExtension[3] buffers separately rather than in one 11 byte copy. Makes gcc4 -Wbounded happy. ok krw
2010-03-29Initialize various uninitialized variables. Found by jsg@ via Clang.Kenneth R Westerback
Feedback from miod@ and kettenis@. ok beck@
2010-01-24"Fix" crash caused by FAT32 re-use of small buf from buffer cache,Kenneth R Westerback
at least until problem (starting somewhere between 4.1 and 4.2) in buffer cache is found and a general fix is in place. Simply B_INVAL small buf so it doesn't come back. Addresses PR#6290, confirmed by submitter RD Thrush. ok tedu@ "should be marked XXX" thib@
2010-01-17Remove dead assignment and newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok tedu@ krw@
2009-12-19Re-introduce the remaining bits of thib@'s Aug 2006 VOP_CLOSE()Kenneth R Westerback
locking fixes. Tweak cd9660 code to be the same as everywhere else, no functional change. ok beck@
2009-10-31Use suser when possible. Suggested by miod@.Federico G. Schwindt
miod@ deraadt@ ok.
2009-08-30lock the vnode before calling VOP_CLOSE() in msdofs_unmount().Thordur I. Bjornsson
ok krw@
2009-08-14- deregister; no binary changeJasper Lievisse Adriaanse
ok thibski@
2009-08-13- ansify function declarations, no binary changeJasper Lievisse Adriaanse
"fine" thib@
2009-08-13- remove super-obvious comments from $fs_vnodeop_entries[]Jasper Lievisse Adriaanse
prodded by and ok thib@ agreed by art@ and blambert@
2009-08-13- missing printf("\n"); after calling lockmgr_printinfo()Jasper Lievisse Adriaanse
"do it" thib@
2009-08-09indicate success for setting directory attributes; first step towardsMartynas Venckus
making directory moves work... discussed w. & makes sense - millert@
2009-07-09Remove the VREF() macro and replaces all instances with a call to verf(),Thordur I. Bjornsson
which is exactly what the macro does. Macro's that are nothing more then: #define FUNCTION(arg) function(arg) are almost always pointless and should go away. OK blambert@ Agreed by many.
2009-01-05The FAT32 fsinxtfree field is advisory in nature and we don't useKenneth R Westerback
it. So leave it untouched. Similiar to but more ruthless than the fixes FreeBSD did, since they do use the value. Basically avoid various off-by-one and off-by-many errors. Fixes problems encountered by jsg@ and deraadt@ where filesystems found on SDHC cards caused UVM faults. Original fixes found by jsg@. ok jsg@.
2008-06-09Update access(2) to have modern semantics with respect to X_OK andTodd C. Miller
the superuser. access(2) will now only indicate success for X_OK on non-directories if there is at least one execute bit set on the file. OK deraadt@ thib@ otto@
2008-05-08retire vn_default_error() and replace all instancesThordur I. Bjornsson
with eopnotsupp() instead; ok blambert@