summaryrefslogtreecommitdiff
path: root/sys/ufs/ext2fs
AgeCommit message (Collapse)Author
2019-07-25vinvalbuf(9): tlseep -> tsleep_nsec(9); ok millert@cheloha
2019-07-19getblk(9): tsleep(9) -> tsleep_nsec(9); ok visa@cheloha
2019-07-01Add more verbose messages about unsupported ext2fs features.Kevin Lo
Based on FreeBSD r320578. While here, rename a few macros to make the consisten and keep in sync with Linux upstream. ok kn@
2018-09-26Move the allocating and freeing of mount points intoVisa Hankala
dedicated functions. OK deraadt@ mpi@
2018-09-06fix whitespaceJonathan Gray
2018-06-21Drop redundant "node == parent node" checks from VOP_RMDIR()Visa Hankala
implementations. Rely on the VFS layer to do the checking. OK mpi@, helg@
2018-06-07Make callers of VOP_CREATE(9) and VOP_MKNOD(9) responsible forVisa Hankala
unlocking the directory vnode. OK mpi@, helg@
2018-05-29Lock the device vnode when calling vinvalbuf() in ext2fs_reload(),Visa Hankala
just as is done in ffs_reload(). Requested by and OK bluhm@
2018-05-28Call vput(dvp) in vnode operation functions instead of calling it inVisa Hankala
the file allocation routine. This allows stepwise changing of the vnode locking discipline. OK mpi@
2018-05-28When mounting an ext2 filesystem, lock the device vnode for the durationVisa Hankala
of the vinvalbuf() call, just like is done by other filesystems. This prevents a kernel panic with VFSLCKDEBUG. OK 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-28Mark ext2fs inode recursive lock as RWL_IS_VNODE like for ffs to let itMartin Pieuchot
play with WITNESS. ok visa@
2018-03-15"force dirty" printf's are no longer required when pushing filesystemsTheo de Raadt
safely to disk. The subsystem seems to be working as intended! :)
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.
2018-01-13In ext2fs_write(), clear the buffer on uiomove() failure unless itTodd C. Miller
was cleared on alloc just like we do in ffs_write().
2018-01-08Pass correct size to uvm_vnp_setsize() for large files.Todd C. Miller
2018-01-08Add kqueue support for ext2fs based on ffs. OK deraadt@Todd C. Miller
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-05-30ext2fs: Mark superblock as not modified when writtenStefan Fritsch
I have seen spurious "file system not clean; please fsck(8)" warnings during "mount -ur". Set e2fs_fmod = 0 when writing the superblock (as ffs does). "Makes sense" deraadt@
2017-04-20Tweak lock inits to make the system runnable with witness(4)Visa Hankala
on amd64 and i386.
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-08-13Missed a couple qaddr_t castsPhilip Guenther
2016-08-10ext2fs only has one set of specops/fifoopsMartin Natano
ok mpi tedu
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-19add pool_setipl on all pools.David Gwynne
ok tedu@ visa@
2016-06-03Unsigned integers can't be negative.Martin Natano
from David Hill and mmcc@ ok stefan
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-27Pad struct ext2fs out to 1024 (a.k.a. ext2fs SBSIZE) bytes. SatisfiesKenneth R Westerback
assumptions in fsck_ext2fs and eliminates spurious "VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE" messages. Part of the problem reported to bugs@ by Lampshade. ok beck@
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-01*** empty log message ***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-26Convert mnt_maxsymlinklen to unsigned.natano
This allows to remove some truncating casts in symlink handling code. Also, validate fs_maxsymlinklen in the superblock at mount time and on fsck to make sure we don't use bogus data. discussion & ok millert@, stefan@
2016-02-16Convert to uiomove. From Martin Natano.Stefan Kempf
2016-02-04Prevent signed overflow when calculating i_modrev initial valueMike Belopuhov
Reported and fixed by Martin Natano <natano at natano ! net>, thanks! ok stefan
2016-01-12Kill the "doclusterread" and "doclusterwrite" defines.Martin Pieuchot
They are defined to 0 since the import of ext2fs 19 years ago.
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-11Casting a gid_t to gid_t for a gid_t argument is overkillPhilip Guenther
2014-12-29Explicitely include <uvm/uvm_extern.h> in order to build on variable page sizeMiod Vallat
architectures.