summaryrefslogtreecommitdiff
path: root/sys/ntfs
AgeCommit message (Collapse)Author
2024-10-18Put the bowels of the various VOP_PRINT routines underMiod Vallat
defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG) as they won't be used otherwise. Shaves a few bytes off installation kernels. ok kn@ semarie@
2024-09-12Ensure that file names passed back by readdir do not include a '/'Claudio Jeker
character. The '/' char is the path separator and is not allowed in any filename. NFS specific report by Apple Security Engineering and Architecture (SEAR). Input from guenther@ and millert@ OK beck@ miod@
2024-09-04Fix some spelling.Marcus Glocker
Input and ok jmc@, jsg@
2024-05-13vfs: VOP_REMOVE: move vnode unlocking and ref dropping to FS-indep partSebastien Marie
while here, ensure all vop_remove field are set, and always call the function. the change is very conservative: it only adds vnode ref drop/unlock where it was absent because it should be unreachable (and if it wasn't, it should fix things). ok miod@
2024-05-13remove prototypes with no matching functionJonathan Gray
ok mpi@
2024-05-12vfs: struct vops: show all members, even if NULLSebastien Marie
In order to help code maintenance, explicitly add all `struct vops` members with the current value (if not present, it is NULL), still using the C99 notation. ok miod@
2022-01-11spellingJonathan Gray
ok jmc@
2021-10-15vnode: remove vop_generic_{,is,un}lock stub functionsSebastien Marie
These functions are only stubs (returning 0). Replace them with nullop function (same behaviour). There is no intented behaviour changes. While here, reorder some vop_islocked member in structs to be next others vop_{,un}lock members. ok visa@
2021-03-11spellingJonathan Gray
2020-02-27Remove unused "struct proc *" argument from the following functions:Martin Pieuchot
- 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@
2020-01-20struct vops is not modified during runtime so use const which moves eachClaudio Jeker
into read-only data segment. OK deraadt@ tedu@
2019-12-26Convert struct vfsops initializer to C99 style.Alexander Bluhm
OK visa@
2019-07-25vinvalbuf(9): tlseep -> tsleep_nsec(9); ok millert@cheloha
2018-05-27Drop unnecessary `p' parameter from vget(9).Visa Hankala
OK mpi@
2018-05-02Remove proc from the parameters of vn_lock(). The parameter isVisa Hankala
unnecessary because curproc always does the locking. OK mpi@
2018-04-28Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is alwaysVisa Hankala
curproc that does the locking or unlocking, so the proc parameter is pointless and can be dropped. OK mpi@, deraadt@
2018-02-10Syncronize filesystems to disk when suspending. Each mountpoint's vnodesTheo de Raadt
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.
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
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
2017-04-11Partially revert previous mallocarray conversions that containDavid Hill
constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
2017-04-09Convert a malloc(9) to mallocarray(9)David Hill
ok deraadt@
2017-03-20Read the free clusters bitmap in 1MB chunksJeremie Courreges-Anglas
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@
2016-09-24use hashfree in fs code. from Mathieu -Ted Unangst
ok guenther
2016-09-07Remove usermount remnants. ok teduMartin Natano
2016-09-01Remove the unused ntfs write code. ok benno beckMartin Natano
2016-08-31Remove some unnecessary assignments in ntfs_subr.c, and move oneTom Cosgrove
assignment into the for() loop where it looks better ok otto@ krw@
2016-08-13Eliminate pointless casts to qaddr_t of a value being assigned to a void*Philip Guenther
ok kettenis@ krw@ natano@ dlg@ espie@
2016-08-10Kill stale prototypes.Martin Natano
ok deraadt millert stefan
2016-06-19Remove the lockmgr() API. It is only used by filesystems, where it is aMartin Natano
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
2016-06-01mkdir() on ntfs should return EROFS, not ENOENT.Martin Natano
issue found by landry ok kettenis millert
2016-05-22When pulling an msdos formated umass stick during mount while theAlexander Bluhm
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@
2016-04-26Populate all necessary statfs members in .vfs_statfs. cd9660, udf,Martin Natano
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
2016-03-27When pulling and unmounting an umass USB stick, the file systemAlexander Bluhm
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@
2016-03-19Remove the unused flags argument from VOP_UNLOCK().natano
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
2016-03-17Set mnt_data to NULL after freeing the file system specific mount point.Alexander Bluhm
OK krw@ natano@ as part of a larger diff
2016-03-05ntfs populates ntfs_args, not msdosfs_args; ok espie@natano
2016-02-27Move mnt_maxsymlink from struct mount to struct ufsmount.natano
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@
2016-02-07Convert to uiomove. While there, use size_t consistently forStefan Kempf
variables 'left' and 'tocopy' and adapt printf and DPRINTF format strings accordingly. From Martin Natano.
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-10Convert uiomovei() with a constant size argument to uiomove().Miod Vallat
2015-02-10Switch uiomovei(..., sizeof whatever, ...) to uiomove().Miod Vallat
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- 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@
2015-01-09rename desiredvnodes to initialvnodes. less of a lie. ok beck deraadtTed Unangst
2014-12-16must include lock.h if you want to play with locksTed Unangst
2014-12-09Sprinkle in a little more mallocarray().Doug Hogan
ok deraadt@ tedu@
2014-11-18Nuke yet more obvious #include duplications.Kenneth R Westerback
ok miod@
2014-11-18use siphash for key lookups in all the filesystem hashes.David Gwynne
ok deraadt@ tedu@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-01-19lazy init nthash to save some memory when it's not used. ok jsingTed Unangst