summaryrefslogtreecommitdiffstats
path: root/sys/ntfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spellingjsg2021-03-112-4/+4
|
* Remove unused "struct proc *" argument from the following functions:mpi2020-02-275-37/+34
| | | | | | | | | | | | | - ufs_chown() & ufs_chmod() - ufs_reclaim() - ext2fs_chown() & ext2fs_chmod() - ntfs_ntget() & ntfs_ntput() - ntfs_vgetex(), ntfs_ntlookup() & ntfs_ntlookupfile() While here use `ap->a_p' directly when it is only required to re-enter the VFS layer in order to help reducing the loop. ok visa@
* struct vops is not modified during runtime so use const which moves eachclaudio2020-01-202-4/+4
| | | | | into read-only data segment. OK deraadt@ tedu@
* Convert struct vfsops initializer to C99 style.bluhm2019-12-261-14/+14
| | | | OK visa@
* vinvalbuf(9): tlseep -> tsleep_nsec(9); ok millert@cheloha2019-07-251-3/+3
|
* Drop unnecessary `p' parameter from vget(9).visa2018-05-271-2/+2
| | | | OK mpi@
* Remove proc from the parameters of vn_lock(). The parameter isvisa2018-05-022-8/+8
| | | | | | unnecessary because curproc always does the locking. OK mpi@
* Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is alwaysvisa2018-04-282-8/+7
| | | | | | | curproc that does the locking or unlocking, so the proc parameter is pointless and can be dropped. OK mpi@, deraadt@
* Syncronize filesystems to disk when suspending. Each mountpoint's vnodesderaadt2018-02-101-3/+3
| | | | | | | | | | are pushed to disk. Dangling vnodes (unlinked files still in use) and vnodes undergoing change by long-running syscalls are identified -- and such filesystems are marked dirty on-disk while we are suspended (in case power is lost, a fsck will be required). Filesystems without dangling or busy vnodes are marked clean, resulting in faster boots following "battery died" circumstances. Tested by numerous developers, thanks for the feedback.
* In uvm Chuck decided backing store would not be allocated proactivelyderaadt2017-12-111-13/+8
| | | | | | | | | | | | | | | | | | | | | | for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
* Partially revert previous mallocarray conversions that containdhill2017-04-111-2/+2
| | | | | | | | | constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
* Convert a malloc(9) to mallocarray(9)dhill2017-04-091-2/+2
| | | | ok deraadt@
* Read the free clusters bitmap in 1MB chunksjca2017-03-201-10/+23
| | | | | instead of trying to read it in one go and panic in malloc(9) with large NTFS filesystems. panic reported and fix tested by landry@
* use hashfree in fs code. from Mathieu -tedu2016-09-241-2/+2
| | | | ok guenther
* Remove usermount remnants. ok tedunatano2016-09-071-13/+1
|
* Remove the unused ntfs write code. ok benno becknatano2016-09-014-230/+15
|
* Remove some unnecessary assignments in ntfs_subr.c, and move onetom2016-08-311-6/+3
| | | | | | assignment into the for() loop where it looks better ok otto@ krw@
* Eliminate pointless casts to qaddr_t of a value being assigned to a void*guenther2016-08-131-2/+2
| | | | ok kettenis@ krw@ natano@ dlg@ espie@
* Kill stale prototypes.natano2016-08-101-4/+1
| | | | ok deraadt millert stefan
* 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
* mkdir() on ntfs should return EROFS, not ENOENT.natano2016-06-011-8/+14
| | | | | issue found by landry ok kettenis millert
* When pulling an msdos formated umass stick during mount while thebluhm2016-05-221-2/+3
| | | | | | | | | | usb stack was busy, the kernel could trigger an uvm fault. There is a race between vop_generic_revoke() and sys_mount() where vgonel() could reset v_specinfo. Then v_specmountpoint is no longer valid. So after sleeping, msdosfs_mountfs() could crash in the error path. The code in the different *_mountfs() functions was inconsistent, implement the same check everywhere. OK krw@ natano@
* Populate all necessary statfs members in .vfs_statfs. cd9660, udf,natano2016-04-261-10/+4
| | | | | | | | | | msdosfs and nfsv2 don't set f_namemax. ntfs and ext2fs don't set f_namemeax and f_favail. fusefs doesn't set f_mntfromspec, f_favail and f_iosize. Also, make all filesystems use copy_statfs_info(), so that all statfs information is filled in correctly for the (sb != &mp->mnt-stat) case. ok stefan
* When pulling and unmounting an umass USB stick, the file systembluhm2016-03-271-6/+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-192-8/+8
| | | | | | 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
* ntfs populates ntfs_args, not msdosfs_args; ok espie@natano2016-03-051-3/+3
|
* Move mnt_maxsymlink from struct mount to struct ufsmount.natano2016-02-271-2/+1
| | | | | | | | | | | | | | The concept of differentiating between "short" and "long" symlinks is specific to ufs/, so it shouldn't creep into the generic fs layer. Inspired by a similar commit to NetBSD. While there replace all references to mnt_maxsymlinklen in ufs/ext2fs with EXT2_MAXSYMLINKLEN, which is the constant max short symlink len for ext2fs. This allows to get rid of some (mnt_maxsymlinklen == 0) checks there, which is always false for ext2fs. input and ok stefan@ ok millert@
* Convert to uiomove. While there, use size_t consistently forstefan2016-02-071-32/+31
| | | | | | | variables 'left' and 'tocopy' and adapt printf and DPRINTF format strings accordingly. From Martin Natano.
* Remove some includes include-what-you-use claims don'tjsg2015-03-144-8/+4
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Convert uiomovei() with a constant size argument to uiomove().miod2015-02-101-3/+3
|
* Switch uiomovei(..., sizeof whatever, ...) to uiomove().miod2015-02-101-4/+4
|
* First step towards making uiomove() take a size_t size argument:miod2015-02-102-12/+12
| | | | | | | - 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
|
* must include lock.h if you want to play with lockstedu2014-12-163-3/+6
|
* Sprinkle in a little more mallocarray().doug2014-12-092-5/+5
| | | | ok deraadt@ tedu@
* Nuke yet more obvious #include duplications.krw2014-11-181-2/+1
| | | | ok miod@
* use siphash for key lookups in all the filesystem hashes.dlg2014-11-181-2/+20
| | | | ok deraadt@ tedu@
* remove uneeded proc.h includesjsg2014-09-142-4/+2
| | | | ok mpi@ kspillner@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-124-31/+31
| | | | after discussions with beck deraadt kettenis.
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-3/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* lazy init nthash to save some memory when it's not used. ok jsingtedu2014-01-194-20/+19
|
* Zero out dirent structures that will be copied out to avoid leaking garbageguenther2013-12-141-31/+31
| | | | | | in the padding or trailing name bytes. ok beck@ millert@ espie@
* Set the d_off member as getdents() expects in ntfs_readdir()guenther2013-12-121-1/+2
| | | | ok and nudge jsing@
* Stop trying to put an off_t into an int, which results in a 2GB limit.jsing2013-12-021-3/+3
| | | | | | From NetBSD. ok krw@
* Avoid truncating 64-bit on disk attribute values to 32-bits. Otherwise anjsing2013-12-022-7/+7
| | | | | | attribute's data length value wraps at 4GB. ok krw@
* Use appropriate format specifiers in debug messages. In particular, avoidjsing2013-12-023-132/+121
| | | | | | | 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@
* Clean up the NTFS debug code - use uppercase names for the debug macros,jsing2013-11-246-225/+217
| | | | | | | | 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@
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-131-35/+8
| | | | | | | | | | | | | | | | | | | | 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-112-4/+4
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others