summaryrefslogtreecommitdiff
path: root/sys/ntfs
AgeCommit message (Collapse)Author
2014-01-19lazy init nthash to save some memory when it's not used. ok jsingTed Unangst
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-12-12Set the d_off member as getdents() expects in ntfs_readdir()Philip Guenther
ok and nudge jsing@
2013-12-02Stop trying to put an off_t into an int, which results in a 2GB limit.Joel Sing
From NetBSD. ok krw@
2013-12-02Avoid truncating 64-bit on disk attribute values to 32-bits. Otherwise anJoel Sing
attribute's data length value wraps at 4GB. ok krw@
2013-12-02Use appropriate format specifiers in debug messages. In particular, avoidJoel Sing
casting almost everything to u_int32_t, then formatting as a signed int (which really helps when you're trying to debug based on 64-bit values). Looked over by krw@
2013-11-24Clean up the NTFS debug code - use uppercase names for the debug macros,Joel Sing
especially since 'dprintf' now has another meaning (at least outside of the kernel). Tweak the macro syntax so we can avoid having to double bracket all invocations. Also apply a good dose of style(9). ok krw@
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-30More of the same: ntfs doesn't do inode numbers >2^32, so use a smaller typePhilip Guenther
internally, only using ino_t in the VFS layer APIs: vget, readdir, getattr
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-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-25Add _KERNEL guard to hide dprintf macro from userland.Brad Smith
ok millert@
2013-01-18Constrain the amount of kernel memory used by NTFS. Keep a small cache ofJoel Sing
loaded ntnodes and once the maximum is reached, unload the least recently used ntnode before loading a new one. This avoids leaving large data structures hanging around, which only get cleaned up when the vnode is reclaimed. Additionally, the buffer cache should contain the data needed to reload the ntnode. ok beck@
2013-01-14Free the directory block buffer at the completion of a readdir,Joel Sing
significantly reducing NTFS kernel memory usage. Without this the buffer is not usually freed until the vnode is reclaimed. Tested by Sebastian Neuper. ok beck@ krw@
2013-01-14Ansify and apply style(9) to function definitions.Joel Sing
ok krw@
2013-01-13Destatic.Joel Sing
ok krw@
2013-01-03Correct error handling in two hard to hit ENOTDIR error cases. These wouldJoel Sing
previously leave the ntnode locked and neglect to decrement the use count. ok krw@ miod@
2013-01-03Ensure that a directory link count is always 1 so that things likeJoel Sing
fts_read() do not try to be smart and end up skipping over directories. Additionally, ip->i_nlink will not be initialised until the ntnode has been loaded for the file. Makes find(1) behave predictably on a mounted NTFS file system. ok miod@
2013-01-02Remove code that is not used on OpenBSD.Joel Sing
ok miod@ 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-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.
2011-12-20respect the MNT_FORCE flag in ntfs_unmount and proceed even if there'sMike Belopuhov
someone holding a system vnode. prevents crashes with forced unmounts. silence ntfs_reclaim so that kernel won't spit out vprint's angrily. ok krw, beck
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_*.
2011-04-03Teach ntfs_mount() how to handle disklabel UIDs.Joel Sing
Diff from Antti Harri.
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-18Make sure readdir cookies are actually allocated with the correct sizeMiod Vallat
(in case eventually we change their type from u_long to something else), and do not truncate them to 32 bits in the ntfs code. ok tedu@
2010-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
2010-09-09nessesary -> necessary.Miod Vallat
2010-09-07Allow NTFS to compile by cutting it over to the new VOP world order.Thordur I. Bjornsson
Small cleanup while here, nuke the ntfs_bypass function and just use eopnotsupp like every other filesystem, it makes no sense to return ENOTTY for unimplemented VOPs.
2010-09-04revert previous "simplification". kcornies at gmail says it doesn't work.Ted Unangst
2010-08-22the upper case table code was a lot more complicated than it needed to be.Ted Unangst
2010-08-12these files don't need to include nearly so many headersTed Unangst
2010-08-12clean up some macro obfuscation and assorted styling problems.Ted Unangst
fix a bonus off by one bug. ok matthew
2010-08-08do not unlock vnode before calling vput. should fix ray's panic.Ted Unangst
ok deraadt krw
2010-08-06Every time you ignore uiomove() return value, $DEITY kills a littleMiod Vallat
$ADORABLE_FELINE. ok deraadt@ matthew@
2010-07-03Last bit of thib@ locking diff from long ago. Put proper lockingKenneth R Westerback
around vinvalbuf(). vrele() -> vput() after VOP_CLOSE(). ok tedu@
2010-06-29keeping a TODO file here implies somebody caresTed Unangst
2010-06-29makefstype was only used in ported from freebsd filesystems. fix themTed Unangst
and remove the function. ok thib
2010-06-06simething -> somethingMiod Vallat
2010-04-23It is about time that we stopped pretending simple_locks are locks.Owain Ainsworth
replace ntfs_nthash_slock usage with comments prefixed XXXLOCKING (for grepability). This lock looks to be correct, but it could well be the bad way to do it (having a rwlock for inserts to avoid races inserting the same inode but then simple locking on list accesses). approach discussed with deraadt@
2010-04-20remove proc.h include from uvm_map.h. This has far reaching effects, asTed Unangst
sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
2010-03-01- properly spell 'exception' in commentsJasper Lievisse Adriaanse
- properly spell 'usefulness'
2009-08-13- remove super-obvious comments from vnodeop_entries[]Jasper Lievisse Adriaanse
- remove #ifdef someos blocks, makes this a tad easier to read agreed by art@ and thib@
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-06-02- make sure biodone() gets run at IPL_BIOJasper Lievisse Adriaanse
OK thib@
2009-03-25convert lockmgr over to rwlock in ntfs, mostly trivial.Owain Ainsworth
Tested by a couple of people, no regressions.
2008-09-01Avoid #pragma pack(1) and unify everything towards using __packed.Theo de Raadt
This requires that structures defined within __packed structures must independently request that they themselves become __packed, too. worked on with toby CVS: ----------------------------------------------------------------------