summaryrefslogtreecommitdiff
path: root/sys/ufs
AgeCommit message (Collapse)Author
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
2011-07-02kqueue attach functions should return an errno or 0, not a plain 1. FixNicholas Marriott
the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
2011-07-02Getting a disklabel to extract d_secsize to initialize a variable that is thenKenneth R Westerback
re-initialized before use is silly. ffs shouldn't know of or worry about the physical disk sector size. ok thib@
2011-07-02rename VFSDEBUG to VFLCKDEBUG;Thordur I. Bjornsson
prompted by tedu@
2011-06-30Add DUID support for ext2fs mounts.Joel Sing
Initial diff from and tested by Luca Corti - thanks!
2011-06-29ansi softdep, ok deraadtTed Unangst
2011-06-28change two function defs with () to (void)Ted Unangst
2011-06-09In ffs_write, do not deref to get the p_ucred for VOP_FSYNC (aka ffs_fsync)Theo de Raadt
when softdep runs out, since it does not use it. In the nfsiod case, that ucred is pointless, and ffs_fsync does not use it in any case. This does not conflict with thib's plans moving forward ok thib
2011-04-12Avoid kvm starvation due to softdeps waiting on too many mapped buffers,Bob Beck
thus possibly consuming all of our available kva mapping buffers for deps. Diff and analysis actually comes from Pedro Martelleto (thanks!) tested by me and thib ok thib@, art@
2011-04-05Every single vop_default is set to eopnotsupp, so retire itThordur I. Bjornsson
and return EOPNOTSUPP directly from the VOP_* functions. Filesystems should, at some point fill in every function in the vop_default struct so we can get rid of the 'if' statements in VOP_*.
2010-12-29remove two unnecessary comments that snuck in with previous.Thordur I. Bjornsson
2010-12-21Bring back the "End the VOP experiment." diff, naddy's issues whereThordur I. Bjornsson
unrelated, and his alpha is much happier now. OK deraadt@
2010-11-18Make sure readdir cookies are actually allocated with the correct sizeMiod Vallat
(in case eventually we change their type from u_long to something else), and do not truncate them to 32 bits in the ntfs code. ok tedu@
2010-09-23The only sensible argument for VOP_* calls that take a struct proc pointer isOwain Ainsworth
curproc. A bunch of callers were passing in 0 (not even NULL, 0) as this pointer, which was fine until the called vnode function tried to do something with it. Typically, this code was then copy/pasted to various parts of the tree. Accept the facts of life and switch all of these over to passing curproc for now until the argument can be removed. Discovered by stsp trying to create a softraid on top of a vnd, which crashed with a NULL deref in vndioctl. softraid bits tested by mikeb and jsing. raidframe bits tested by pea, matthieu and naddy. The rest tested by at least thib, jsing and myself. ok thib@, jsing@.
2010-09-23Change:Owain Ainsworth
/* something */ if (error) { VOP_UNLOCK(); return; } VOP_UNLOCK(); to the clearer and shorter: VOP_UNLOCK(); if (error) return; ok thib@, jsing@ as part of a larger diff.
2010-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
2010-09-09Rename lookup/relookup to vfs_lookup/vfs_relookup.Thordur I. Bjornsson
OK oga@, beck@, matthew@
2010-09-06End the VOP experiment. Instead of the ridicolusly complicated operationThordur I. Bjornsson
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@.
2010-08-20Change the UFS DIP macros to be aware of the FFS2 kernel option by notMatthew Dempsky
bothering to check the mount type when FFS2 support is omitted. ok krw@, jasper@; "i like it" tedu@
2010-08-02Fix readlink(2) on FFS and ext2 filesystems to consistently returnMatthew Dempsky
EFAULT when appropriate. ok deraadt@, miod@
2010-07-23Improve English.Ray Lai
Help by jmc, earlier version OK thib krw
2010-07-19Not enough OK's, and from the wrong people. You should know how to doTheo de Raadt
collaborative development by now, Owain
2010-07-19Replace XXXLOCKING comments by me (replacing simple_locks that are theOwain Ainsworth
same thing) with mutexes. From Gabriel Kihlman (gk AT stacken DOT kth DOT se); thanks! ok art@ ages ago.
2010-07-13fix overflow of dirsize; from FreeBSD; PR 6426; ok beck@ millert@Otto Moerbeek
2010-07-03de-static ufs_chown and ufs_chmod so they show up in DDB.Thordur I. Bjornsson
2010-06-29remove lies. the arguments are actually used.Thordur I. Bjornsson