summaryrefslogtreecommitdiff
path: root/sys/isofs
AgeCommit message (Collapse)Author
2018-09-26Move the allocating and freeing of mount points intoVisa Hankala
dedicated functions. OK deraadt@ mpi@
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-03-28Use RWL_IS_VNODE with locks that are acquired through VOP_LOCK(),Visa Hankala
to appease WITNESS. ext2fs and ffs already use the flag. The same locking pattern appears with other file systems too, so this patch addresses the remaining cases. OK mpi@
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-30Don't pull in <sys/file.h> just to get fcntl.hPhilip Guenther
ok deraadt@ krw@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
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-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-04-20Tweak lock inits to make the system runnable with witness(4)Visa Hankala
on amd64 and i386.
2017-02-08Move a pointer deref to after a NULL test.Jonathan Gray
ok krw@
2016-09-24use hashfree in fs code. from Mathieu -Ted Unangst
ok guenther
2016-09-15all pools have their ipl set via pool_setipl, so fold it into pool_init.David Gwynne
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
2016-09-07Remove usermount remnants. ok teduMartin Natano
2016-09-02Variable 'imp' is set earlier in cd9660_mount() if it's needed (whenTom Cosgrove
MNT_UPDATE is set in mnt_flag), so remove an unnecessary assignment later. ok bluhm
2016-08-25pool_setipl for udfDavid Gwynne
ok phessler@ 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-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-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-14Change a bunch of (<blah> *)0 to NULL.Kenneth R Westerback
ok beck@ deraadt@
2016-03-07Sync no-argument function declaration and definition by adding (void).Christian Weisgerber
ok mpi@ millert@
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-02Convert to uiomove(). From Martin Natano.Stefan Kempf
2016-01-19Convert min() and uiomovei() to ulmin() and uiomove().Stefan Kempf
Diff from Martin Natano ok kettenis@
2015-12-11implement kqfilter. copied from tmpfs (which I copied from ufs).Ted Unangst
hint about kqueue from jsg after a crashing httpd report from sevan
2015-09-23remove lockmgr_printinfo stubs. from Martin NatanoTed Unangst
2015-09-09Nuke some extraneous whitespace.Kenneth R Westerback
2015-08-31Use PR_WAITOK to indicate that pools are not used in interrupt contextMark Kettenis
instead of using pool_allocator_nointr. ok tedu@
2015-04-17Tweaks utimensat/futimens handling to always update ctime, even when bothPhilip Guenther
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
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-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-16primary change: move uvm_vnode out of vnode, keeping only a pointer.Ted Unangst
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
2014-11-18use siphash for key lookups in all the filesystem hashes.David Gwynne
ok deraadt@ tedu@
2014-11-03include sys/unistd.h where needed instead of indirect reliance. ok jsgTed Unangst
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-05-09stop using B_AGE, it was effectively retired some time ago.Ted 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-01Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andKenneth R Westerback
use TAILQ_*_SAFE more than might be needed. Bulk ports build by sthen@ showed nobody sticking their fingers so deep into the kernel. Feedback and suggestions from millert@. ok jsing@
2013-11-21remove the #define b_cylinder b_resid from bufs. i hated theDavid Gwynne
overloading of that thing. the only hardware that seems to care about cylinders in our tree are floppy drives, and the drivers for those calculate their own cylinders from logical block addresses and ignore whatever the rest of the kernel thought b_cylinders should be. most of this diff is moving the floppy drivers to using b_resid as a resid and using that as part of the calculation for real cylinder values. the rest of the diff is getting rid of the useless assignments to b_cylinder that dont get used by anything (now that disksort is gone). ok miod@
2013-09-22On return, uio_offset needs to be set to the offset of the first entryPhilip Guenther
not returned instead of the offset after that one. udf_uiodir() returns -1 when there isn't enough space for the next entry, so just break from the loop and return 0 in that case. Remove the bogus printf there now that this is handled correctly. problem reported by espie@
2013-09-17KNF - extraneous blank line snuck in during last commitMike Larkin
2013-08-30Fix handling of getdents() against UDF filesystems: d_off must be thePhilip Guenther
position after the entry, and seeking to just after the '.' or '..' entries requires special handling because they're fabricated. ok krw@
2013-08-16int overflow in sector calculation, broke UDF reads past 2GB. Diff promotesMike Larkin
sector to daddr_t before calculation to avoid overflow. ok deraadt@