summaryrefslogtreecommitdiffstats
path: root/sys/isofs/udf/udf_vfsops.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert previous. hashfree() just calls free() which handles NULL withkrw2020-06-231-7/+6
| | | | | | aplomb. 16 lines of 'C' can be so hard to grok at a glance. Prompted to look more closely at those 16 lines by mpi@.
* hashfree() doesn't like NULL, so check for NULL if NULL is akrw2020-06-231-6/+7
| | | | | | | | possibility. i.e. when bailing out before calling hashinit().. COVERITY 1452907 ok mpi@
* 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
|
* Remove proc from the parameters of vn_lock(). The parameter isvisa2018-05-021-4/+4
| | | | | | unnecessary because curproc always does the locking. OK mpi@
* Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is alwaysvisa2018-04-281-4/+4
| | | | | | | curproc that does the locking or unlocking, so the proc parameter is pointless and can be dropped. OK mpi@, deraadt@
* Use RWL_IS_VNODE with locks that are acquired through VOP_LOCK(),visa2018-03-281-2/+2
| | | | | | | | 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@
* Syncronize filesystems to disk when suspending. Each mountpoint's vnodesderaadt2018-02-101-2/+2
| | | | | | | | | | 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-10/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-081-2/+1
|
* Tweak lock inits to make the system runnable with witness(4)visa2017-04-201-2/+2
| | | | on amd64 and i386.
* Move a pointer deref to after a NULL test.jsg2017-02-081-3/+2
| | | | ok krw@
* use hashfree in fs code. from Mathieu -tedu2016-09-241-6/+3
| | | | ok guenther
* all pools have their ipl set via pool_setipl, so fold it into pool_init.dlg2016-09-151-7/+4
| | | | | | | | | | | | | | | | | | | | | | 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);
* Remove usermount remnants. ok tedunatano2016-09-071-12/+1
|
* pool_setipl for udfdlg2016-08-251-1/+4
| | | | ok phessler@ 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@
* 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
* When pulling an msdos formated umass stick during mount while thebluhm2016-05-221-1/+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-1/+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-4/+2
| | | | | | | | | | | | 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-191-5/+5
| | | | | | 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-2/+2
| | | | OK krw@ natano@ as part of a larger diff
* Use PR_WAITOK to indicate that pools are not used in interrupt contextkettenis2015-08-311-7/+7
| | | | | | instead of using pool_allocator_nointr. ok tedu@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* primary change: move uvm_vnode out of vnode, keeping only a pointer.tedu2014-12-161-1/+2
| | | | | | 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
* use siphash for key lookups in all the filesystem hashes.dlg2014-11-181-1/+4
| | | | ok deraadt@ tedu@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-10/+10
| | | | after discussions with beck deraadt kettenis.
* CD filesystems don't do inode numbers >2^32, so use a smaller type internally,guenther2013-05-301-3/+7
| | | | | | only using ino_t in the VFS layer APIs: vget, readdir, getattr. ok matthew@
* Add an f_mntfromspec member to struct statfs, which specifies the name ofjsing2013-04-151-1/+3
| | | | | | | | | | | | | 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@
* Cleanup VFS mount string handling:jsing2012-09-101-7/+11
| | | | | | | | | | | - 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@
* move the specfs code to a place people can see it; ok guenther thib krwderaadt2011-07-041-3/+2
|
* bread does nothing with its ucred argument. remove it. ok matthewtedu2011-07-041-4/+3
|
* Bring back the "End the VOP experiment." diff, naddy's issues wherethib2010-12-211-2/+2
| | | | | | unrelated, and his alpha is much happier now. OK deraadt@
* Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)thib2010-09-101-2/+2
| | | | have been resolved.
* End the VOP experiment. Instead of the ridicolusly complicated operationthib2010-09-061-2/+2
| | | | | | | | | | | | | | | | | | | 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@.
* makefstype was only used in ported from freebsd filesystems. fix themtedu2010-06-291-2/+2
| | | | and remove the function. ok thib
* Re-introduce the remaining bits of thib@'s Aug 2006 VOP_CLOSE()krw2009-12-191-1/+4
| | | | | | | locking fixes. Tweak cd9660 code to be the same as everywhere else, no functional change. ok beck@
* make UDF less chatty during normal operationjolan2009-08-271-1/+3
| | | | ok krw/phessler
* First cut at UDF 2.[56] support, allowing read-only access to HDDVDkrw2009-08-141-25/+112
| | | | | | | | | | and Blu-ray disks. Previously working DVDs should still work. Done at f2k9 with phessler@. Vnode bug squashing by beck@. Thanks to Bryan Brake for sending HDDVD/Blu-ray hardware and disks to f2k9 in Stockholm. ok beck@ dlg@ phessler@
* Remove the VREF() macro and replaces all instances with a call to verf(),thib2009-07-091-2/+2
| | | | | | | | | | | 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.
* Update to Reinoud Zandijk's much more current version of ecma167-udf.hkrw2009-06-051-13/+14
| | | | | | | and make textual tweaks to .c files to keep them compiling. From NetBSD. No changes to .o's at this point.
* A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO)mk2008-06-141-3/+2
| | | | | | | conversions that should shave a few bytes off the kernel. ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer FOO|BAR''; thanks for looking.
* update pedro's email address, at his request;jmc2007-12-091-2/+2
|
* Oops. Forgot to do FREE -> free when I did MALLOC -> malloc.krw2007-10-061-3/+3
|
* MALLOC+bzero -> malloc+M_ZERO.krw2007-10-031-4/+2
| | | | | | | | In ip_esp.c all allocated memory is now zero'd in the "malloc(sizeof(*tc) + alen ..." case. The +alen memory was not initialized by the bzero() call. Noticed by chl@. "Looks good" art@ "seems ok" chl@
* Revert last commitpedro2006-08-071-4/+1
|
* obey the locking disaplince wrt to VOP_CLOSE during umountsthib2006-08-061-1/+4
| | | | | | and mount error paths. ok sturm@ pedro@
* Don't hold up a vnode for the VAT when a unode is sufficientpedro2006-07-111-1/+4
|
* Make the mounting process pass a hint to the kernel of where to find the VATpedro2006-07-111-6/+5
|