summaryrefslogtreecommitdiff
path: root/sys/ufs
AgeCommit message (Collapse)Author
2013-12-12bcmp -> memcmpTed Unangst
2013-12-12replace old bcopy/bzero with standard functions. ok kettenisTed Unangst
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-23Verify that the directory entry being looked at is entirely present inPhilip Guenther
the read buffer before trying to process it, so that invalidated or bogus offsets can't trigger access past the end of the read buffer. Also, zero out the dirent buffer to avoid leaking stack garbage to userspace. Problem pointed out by Pedro Martelletto (pedro (at) ambientworks.net) ok deraadt@
2013-11-12Tweak comment to explicitly mention that disk blocks are DEV_BSIZEKenneth R Westerback
(a.k.a. 512-bytes) as far as ffs is concerned.
2013-11-03Add missing (long long) cast of variable, (long long) castsKenneth R Westerback
for defines fragnum, fsbtodb, cgsblock, and cgdmin.
2013-11-02No need to cast constants or simple variables to (daddr_t). UseKenneth R Westerback
(u_int64_t) instead of (daddr_t) when casting a variable in an expression passed to DL_SETDSIZE(). Change a variable counting open files from daddr_t to int64_t. ok deraadt@ with the tweak to fix that pesky expression.
2013-11-01Sprinkle (long long) casts where %lld is being used to print daddr_tKenneth R Westerback
variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
2013-09-22Delete a T32 chunk that I missed before and update the comment onPhilip Guenther
ufs_readdir() to match
2013-09-14Correct the handling of I/O of >=2^32 bytes and the ktracing there ofPhilip Guenther
by using size_t/ssize_t instead of int/u_int to handle I/O lengths in uiomove(), vn_fsizechk(), and ktrgenio(). Eliminate the always-zero 'error' argument to ktrgenio() at the same time.
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
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@
2013-08-09Uncomment another kprintf attribute.Sylvestre Gallon
ok miod@.
2013-07-03(Re)define the quota file format to be independent of time_t; changingPhilip Guenther
the layout calls for some conversion assistance and can be deferred until the other big time_t issues are resolved ok deraadt@
2013-06-18sqiud -> squidMiod Vallat
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-06-08KNFBob Beck
2013-06-02TypoPhilip Guenther
2013-05-30UFS does't do inode numbers >2^32, so use a smaller type internally,Philip Guenther
only using ino_t in the VFS layer APIs: vget, readdir, getattr. otto wrote the original diff for libsa to keep bootblock from overflowing ok deraadt@ kettenis@
2013-05-01Remove useless cast of ROOT_INFO to ino_t. OK otto@Todd C. Miller
2013-04-23change ffs layout policy. try to pack meta data in close to the start ofTed Unangst
each cylinder group, which should speed up disk access a little and fsck substantially. adapted from freebsd. for more info: www.mckusick.com/publications/faster_fsck.pdf ok deraadt
2013-04-22ffs2 blockcount is unsigned, so we must check for underflow beforehand.Ted Unangst
from freebsd. ok deraadt guenther otto
2013-04-15Add an f_mntfromspec member to struct statfs, which specifies the name ofJoel Sing
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@
2013-04-04Fix bug where clear_remove() and clear_inodedeps() would not iterateBob Beck
over the entire pagedep and inodedep hash tables due to an off-by-one mistake in loops. Spotted by and diff from Pedro Martelletto. Sent upstream to Kirk and also fixed in FreeBSD. ok otto@ millert@
2013-03-28Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,Philip Guenther
msdos, NFS, fifos and devices, plus support for querying it in getconf(2) and the requisite pathconf(2) manpage blurb ok tedu@
2013-03-28Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,Philip Guenther
_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@
2013-02-17Comment out recently added __attribute__((__format__(__kprintf__))) annotationsMiod Vallat
in MI code; gcc 2.95 does not accept such annotation for function pointer declarations, only function prototypes. To be uncommented once gcc 2.95 bites the dust.
2013-02-09Add explicit __attribute__ ((__format__(__kprintf__)))) to the functions andMiod Vallat
function pointer arguments which are {used as,} wrappers around the kernel printf function. No functional change.
2013-01-16re-backout the infamous softdep diff - originally committed to get aroundBob Beck
the problem of the cleaner not being able to get softdep out of trouble due to the removal of a reserve back in vienna. Been run by me for a long time and beat up, along with a bunch of others. Hopefully this nasty piece of workaround can stay out for good now. ok guenther@
2013-01-15Switch mfs to bufq. This simplifies the code, gives us queue limits forJoel Sing
free and uses FIFO queueing (rather than the current LIFO queueing). Tested by sthen@ ok beck@ krw@
2012-12-29Keep mfs from potentially consuming the entire buffer cache if it getsBob Beck
behind. ok jsing@
2012-12-10Fix potential for use-after-free of bufs in softdep.Bob Beck
Softdep uses it's own "getdirtybuf" which has (always) potentially slept - this wasn't noticable when buffers were static and never freed, however now that the bufs it was trying to busy is might have been written out and freed by someone else we can see use-after free if we fast-recycle buffers. We fix this by either re-trying operations or ensuring we don't use the buf pointer after waiting. ok guenther@ (in coimbra)
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-09-17fix uninitialized pointer in ffs_write(); ok guenther, beck, deraadtMarkus Friedl
2012-09-10Cleanup VFS mount string handling:Joel Sing
- 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@
2012-08-16remove pool hiwat call. hiwat is less useful than it used to be.Ted Unangst
less greedy pools are nicer pools.
2012-07-11If the current offset is strictly less than the process filesizePhilip Guenthe
rlimit, then a write that would take it over the limit should be clamped, making it a partial write. ok beck@
2012-06-20Cleanup our filesystem pathconf() code a little bit to make it easierMatthew Dempsky
to diff against FreeBSD's. From Brad; no object file change on amd64.
2012-06-19Add more pathconf(2) variables from POSIX.Matthew Dempsky
From FreeBSD via Brad; ok millert
2012-06-10Do NOT make all check condition results report EIO. Only use EIOKenneth R Westerback
when b_error has not already been set to something more informative, e.g. EROFS. DO check the result of ffs_sbupdate() and error out of a mount() call when ffs_sbupdate() reports EROFS while attempting a rw mount. Letting RW mounts proceed regardless of EROFS led to crashes and usb problems for Oliver Seufer while using the RW/RO switches on some usb devices. Fix developed using devices kindly supplied by Oliver & Co. ok miod@
2012-03-23Make rusage totals, itimers, and profile settings per-process insteadPhilip Guenthe
of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
2011-09-18Fix more printf format string bugs in sys/ufs.Alexander Bluhm
ok miod
2011-09-18Make sure daddr64_t values get printed with %lld.Miod Vallat
ok deraadt@
2011-08-17remove the clamping of max_softdeps as it makesThordur I. Bjornsson
softdeps almost totally unusable;
2011-08-16Put back the pedro diff for VOP_FSYNC of softdep when itsThordur I. Bjornsson
limit is reached. Added twist, clamp the max_softdeps to 64 as it is still possible to exhaust bufkva.
2011-08-03back out pedro diff for VOP_FSYNC of softdep when limit is reached.Bob Beck
The basic analysys is correct, however, the problem in this case is that by forcing softdept to synchornously flush everything across *all* softdep filesystems we cause a huge performance problem when we take a 3 second pause and slam everything synchronously. the right way to fix this is to fix the speedup_softdep code, not make the filesystem go synchronous when we hit a limit - if we are doing that we may as well not run softdep it will be faster. ok deraadt@
2011-07-08ansi, no binary changeJonathan Gray
2011-07-04move the specfs code to a place people can see it; ok guenther thib krwTheo de Raadt
2011-07-04bread does nothing with its ucred argument. remove it. ok matthewTed Unangst
2011-07-04bread() takes daddr64_t block address, not int32_t, so use correct cast. ↵Kenneth R Westerback
bread() always takes DEV_BSIZE address units so don't bother getting the disklabel and trying to convert units to d_secsize. Nukes last references to d_secsize in ufs/. ok tedu@
2011-07-03correctify NULL 0 confusionTed Unangst