summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* MFC r319539:kib2017-06-172-26/+74
| | | | | | | Mitigate several problems with the softdep_request_cleanup() on busy host. Approved by: re (gjb)
* MFC r319518:kib2017-06-101-0/+4
| | | | | | | | | | | Ensure that cached struct thread does not keep spurious td_su reference on an UFS mount point. MFC r319519: Clean possible td_su reference on the struct mount being unmounted as the last step of ffs_unmount(). Approved by: re (gjb)
* MFC r317908:kib2017-05-141-6/+0
| | | | Remove spl() calls from UFS code.
* MFC r314253:kib2017-03-111-4/+6
| | | | Do not leak mount references for dying threads.
* MFC r311522:kib2017-01-132-5/+7
| | | | Use type-independent formats for printing nlink_t and ino_t.
* MFC r308618:kib2016-11-271-2/+18
| | | | | Provide simple mutual exclusion between mount point update and unmount. In the update path in ffs_mount(), drop vfs_busy() reference around namei().
* MFC r308064:mckusick2016-11-261-10/+12
| | | | | Avoid possible overflow when calclating malloc size for auxillary data structure sizes when mounting and reloading UFS/FFS filesystems.
* MFC r307978:mckusick2016-11-161-20/+39
| | | | | | | Bug 180894 reports that rm -rf on a directory causes kernel panic and reboot. Return EINVAL rather than panic for low directory link count. PR: 180894
* MFC r308026:kib2016-11-111-147/+19
| | | | | | | Generalize UFS buffer pager. MFC r308442: Tweaks for the buffer pager.
* MFC r307626:kib2016-11-021-4/+168
| | | | | | Add FFS pager, which uses buffer cache read operation to validate pages. For now, the pager is disabled by default in the stable branch.
* MFC r304230:mckusick2016-10-172-22/+125
| | | | | | | | | | Add two new macros, SLIST_CONCAT and LIST_CONCAT. MFC r304239: Bug 211013 reports that a write error to a UFS filesystem running with softupdates panics the kernel. PR: 211013
* MFC r305977:kib2016-10-032-9/+18
| | | | Be more strict when selecting between snapshot/regular mount.
* MFC r305902:kib2016-10-0118-365/+418
| | | | | | | Reduce size of ufs inode. MFC r305903: Fix libprocstat build after r305902.
* MFC r305601:kib2016-09-221-2/+12
| | | | On rename, do not perform truncation of dirhash if the vnode truncation failed.
* MFC r305599:kib2016-09-221-0/+1
| | | | Do not leak transient ENOLCK error from flush_newblk_dep() loop.
* MFC r305598:kib2016-09-221-1/+2
| | | | | When logging unlikely UFS_TRUNCATE() failure in ufs_direnter(), include error code.
* MFC r305597:kib2016-09-221-0/+1
| | | | When extending directory inode in ufs_direnter(), adjust i_endoff.
* MFC r305595:kib2016-09-221-2/+7
| | | | | | In dqsync(), when called from quotactl(), um_quotas entry might appear cleared since nothing prevents completion of the parallel quotaoff. There is nothing to sync in this case, and no reason to panic.
* MFC r305594:kib2016-09-221-3/+6
| | | | | In softdep_prealloc(), return early not only for snapshots, but for the quota files as well.
* MFC r305593:kib2016-09-221-32/+19
| | | | | | There is no need to upgrade the last dvp lock on lookups for modifying operations. Instead of upgrading, assert that the lock is exclusive. Explain the cause in comments.
* MFC r305592:kib2016-09-223-5/+16
| | | | | Partially lift suspension when ffs_reload() finished with cgs and going to re-read inodes.
* MFC r304180:kib2016-08-292-22/+68
| | | | Implement VOP_FDATASYNC() for UFS.
* MFC r303924 (by trasz):kib2016-08-294-4/+4
| | | | Eliminate vprint().
* MFC r304232:kib2016-08-231-4/+4
| | | | | In UFS_BALLOC(), invalidate pages of indirect buffers on failed block allocation unwinding.
* MFC r304231:kib2016-08-231-0/+34
| | | | | | | | On unwind after failed block allocation in ffs_balloc_ufs{1,2}, assert that recorded allocated blocks numbers match the physical block numbers of dandling buffers which are released. When finally freeing the blocks during unwind, assert that dandling buffers where not re-allocated.
* MFC r304229:kib2016-08-231-2/+4
| | | | | When looking up dandling buffers for unwing after failing block allocation in UFS_BALLOC(), there is no need to map them.
* MFC r304228:kib2016-08-231-4/+4
| | | | | When block allocation fails in UFS_BALLOC(), and the volume does not have SU enabled, there is no point in calling softdep_request_cleanup().
* MFC r304227:kib2016-08-231-0/+12
| | | | | In ffs_balloc_ufs{1,2} routines, assert that unwind records do not overflow local arrays.
* MFC r303090:kib2016-07-272-2/+5
| | | | | | | Ensure that the UFS directory vnode' vm_object is properly sized before UFS_BALLOC() is called. Approved by: re (delphij)
* arc4random() returns 0 to (2**32)−1, use an alternative to initializekevlo2016-05-222-4/+6
| | | | | | | | i_gen if it's zero rather than a divide by 2. With inputs from delphij, mckusick, rmacklem Reviewed by: mckusick
* Stop dropping and reacquiring Giant around geom calls in UFS.kib2016-05-211-16/+0
| | | | Sponsored by: The FreeBSD Foundation
* Improve handling of rdev->si_mountpt on mount and unmount of FFSkib2016-05-211-13/+17
| | | | | | | | | | | | | volumes. Treat the field as a semaphore protecting availability of the device for mounting. Do no access devvp->v_rdev without the vnode lock owned. Protect change of the devvp->v_bufobj bo_ops vector with the vnode lock. Reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Ensure that ftruncate(2) is performed synchronously when file iskib2016-05-181-1/+2
| | | | | | | | | | opened in O_SYNC mode, at least for UFS. This also handles truncation, done due to the O_SYNC | O_TRUNC flags combination to open(2), in synchronous way. Noted by: bde Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Do enable io accounting for read-only mounts and mounts which arekib2016-05-171-2/+4
| | | | | | | | | remounted to writeable after initial read-only. Assign to dev->si_mountpt earlier to account the accesses done at the mount time. Based on submission by: bde MFC after: 1 week
* If IO_SYNC was passed to ffs_truncate(), request synchronous inodekib2016-05-171-1/+1
| | | | | | | update from the final ffs_update(). Noted by: bde MFC after: 1 week
* For async UFS mounts, shrink the directory asynchronously, at least dokib2016-05-171-1/+1
| | | | | | | not pass IO_SYNC to ffs_truncate() unneccessary. Submitted by: bde MFC after: 1 week
* Fix comments.kib2016-05-171-2/+2
| | | | | Submitted by: bde MFC after: 1 week
* Fix typo in the message.kib2016-05-171-1/+1
| | | | | Submitted by: bde MFC after: 1 week
* UFS: spelling fixes on comments.pfg2016-04-296-10/+10
| | | | No functional change.
* Add FEATURE knob for testing for UFS extended attribute kernel supportngie2016-04-221-0/+2
| | | | | | | | | | Support can be verified via `feature_present("ufs_extattr")`, etc. Differential Revision: https://reviews.freebsd.org/D6053 MFC after: 2 weeks Relnotes: yes Reviewed by: asomers, kib Sponsored by: EMC / Isilon Storage Division
* sys: use our roundup2/rounddown2() macros when param.h is available.pfg2016-04-213-5/+5
| | | | | | | | | | rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
* ufs: replace 0 with NULL for pointers.pfg2016-04-104-22/+29
| | | | | | | | | | While here also do late initialization of the variables we are changing. Found with devel/coccinelle. Reviewed by: mckusick MFC after: 2 weeks
* Add four new RCTL resources - readbps, readiops, writebps and writeiops,trasz2016-04-073-0/+24
| | | | | | | | | | | | | | | for limiting disk (actually filesystem) IO. Note that in some cases these limits are not quite precise. It's ok, as long as it's within some reasonable bounds. Testing - and review of the code, in particular the VFS and VM parts - is very welcome. MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5080
* Remove some NULL checks for M_WAITOK allocations.trasz2016-03-291-2/+0
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Split the global taskqueue used to process all UFS trim completions,kib2016-03-273-3/+19
| | | | | | | | | | | | | | | | into per-mount taskqueue with the private taskqueue processing thread. This allows to drain the taskqueue on unmount, to ensure that all TRIMs are finished before mount structures are freed. But just draining the taskqueue where TRIM biodone geom-up completions are processed is not enough, since ffs_blkfree(), called by the task, might result in more writes. Count inflight delayed blkfree's and pause() unmount until the counter drains as well. Reported by: Nick Evans <nevans@talkpoint.com> Tested by: Nick Evans <nevans@talkpoint.com>, pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Style: wrap long lines.kib2016-03-271-2/+4
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Fix locking mistake in softdep_waitidle(). The surrounding codekib2016-03-231-1/+1
| | | | | | | | | expects that the loop is always exited with the SU lock owned, even on error. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 days
* The UFS filesystem requires that the last block of a file always bemckusick2016-02-241-17/+60
| | | | | | | | | allocated. When shortening the length of a file in which the new end of the file contains a hole, the hole must have a block allocated. Reported by: Maxim Sobolev Reviewed by: kib Tested by: Peter Holm
* Remove ffs_mountroot() prototype; seems to be long gone.trasz2016-01-281-1/+0
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* This fixes a bug in UFS2 exported NFS volumes. An NFS client canmckusick2016-01-271-3/+28
| | | | | | | | | | | | | | crash a server that has exported UFS2 by presenting a filehandle with an inode number that references an uninitialized inode in a cylinder group. The problem is that UFS2 only initializes blocks of inodes as they are first allocated and ffs_fhtovp() does not validate that the inode is in a range of inodes that have been initialized. Attempting to read an uninitialized inode gets random data from the disk. When the kernel tries to interpret it as an inode, panics often arise. Reported by: Christos Zoulas (from NetBSD) Reviewed by: kib
OpenPOWER on IntegriCloud