summaryrefslogtreecommitdiffstats
path: root/sys/isofs/udf (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@
* 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-3/+2
| | | | OK mpi@
* Remove proc from the parameters of vn_lock(). The parameter isvisa2018-05-022-7/+6
| | | | | | 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@
* 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-102-4/+4
| | | | | | | | | | 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-193-10/+9
| | | | | | | | 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-192-9/+9
| | | | | | 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
* Convert to uiomove(). From Martin Natano.stefan2016-02-021-7/+6
|
* remove lockmgr_printinfo stubs. from Martin Natanotedu2015-09-231-2/+1
|
* 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-142-4/+2
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-3/+3
| | | | | | | - 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@
* primary change: move uvm_vnode out of vnode, keeping only a pointer.tedu2014-12-163-3/+6
| | | | | | 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-184-7/+18
| | | | ok deraadt@ tedu@
* include sys/unistd.h where needed instead of indirect reliance. ok jsgtedu2014-11-032-4/+3
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-122-14/+14
| | | | after discussions with beck deraadt kettenis.
* Zero out dirent structures that will be copied out to avoid leaking garbageguenther2013-12-141-1/+2
| | | | | | in the padding or trailing name bytes. ok beck@ millert@ espie@
* On return, uio_offset needs to be set to the offset of the first entryguenther2013-09-221-4/+11
| | | | | | | | | 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@
* KNF - extraneous blank line snuck in during last commitmlarkin2013-09-171-2/+1
|
* Fix handling of getdents() against UDF filesystems: d_off must be theguenther2013-08-301-18/+41
| | | | | | | position after the entry, and seeking to just after the '.' or '..' entries requires special handling because they're fabricated. ok krw@
* int overflow in sector calculation, broke UDF reads past 2GB. Diff promotesmlarkin2013-08-161-2/+3
| | | | | | sector to daddr_t before calculation to avoid overflow. ok deraadt@
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-131-54/+10
| | | | | | | | | | | | | | | | | | | | 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-111-6/+6
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* Actually use the subsecond timestamp dataguenther2013-06-021-3/+4
| | | | ok deraadt@
* repair and activate pathconf supportderaadt2013-06-022-6/+13
| | | | ok guenther
* CD filesystems don't do inode numbers >2^32, so use a smaller type internally,guenther2013-05-303-11/+17
| | | | | | 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@
* Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,guenther2013-03-281-4/+1
| | | | | | | | | | | _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@
* A small sprinking of #ifdef _KERNELderaadt2013-03-232-3/+14
|
* convert a DEV_BSHIFT use to DEV_BSIZE (this .h file is reused inderaadt2013-03-231-2/+2
| | | | | in userland by libkvm) ok sthen
* 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@
* Cleanup our filesystem pathconf() code a little bit to make it easiermatthew2012-06-201-6/+10
| | | | | | to diff against FreeBSD's. From Brad; no object file change on amd64.