aboutsummaryrefslogtreecommitdiff
path: root/lib/libstand/write.c
Commit message (Collapse)AuthorAgeFilesLines
* Move lib/libstand to sys/boot/libsaWarner Losh2017-10-121-95/+0
| | | | | | | | | | Move the sources to sys/boot. Make adjustments related to the move. Kill LIBSTAND_SRC since it's no longer needed. Sponsored by: Netflix Notes: svn path=/head/; revision=324551
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* dosfs support in libstand is broken since r298230Toomas Soome2016-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Apparently the libstand dosfs optimization is a bit too optimistic and did introduce possible memory corruption. This patch is backing out the bad part and since this results in dosfs reading full blocks now, we can also remove extra offset argument from dv_strategy callback. The analysis of the issue and the backout patch is provided by Mikhail Kupchik. PR: 214423 Submitted by: Mikhail Kupchik Reported by: Mikhail Kupchik Reviewed by: bapt, allanjude Approved by: allanjude (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8644 Notes: svn path=/head/; revision=310850
* A new implementation of the loader block cacheAllan Jude2016-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy. Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks. Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device. The cache also implements limited read-ahead to increase performance. To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache. Booting from a virtual CD over IPMI: 0ms latency, before: 27 second, after: 7 seconds 60ms latency, before: over 12 minutes, after: under 5 minutes. Submitted by: Toomas Soome <tsoome@me.com> Reviewed by: delphij (previous version), emaste (previous version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D4713 Notes: svn path=/head/; revision=298230
* Add a divisor parameter to twiddle() so that callers can request that outputIan Lepore2014-12-221-1/+1
| | | | | | | | | | | | | | | only happen on every Nth call. Update the existing twiddle() calls done in various IO loops to roughly reflect the relative IO sizes. That is, tftp and nfs call twiddle() on every 1K block, ufs on every filesystem block, so the network calls now use a much larger divisor than disk IO calls. Also add a new twiddle_divisor() function that allows an application to set a global divisor that is applied on top of the per-call divisors. Nothing calls this yet, but loader(8) will be using it to further throttle the cursor for slow serial consoles. Notes: svn path=/head/; revision=276079
* Remove California Regent's clause 3, per letterWarner Losh2007-01-091-4/+0
| | | | Notes: svn path=/head/; revision=165906
* Remove 'register' keyword.David E. O'Brien2002-03-211-1/+1
| | | | Notes: svn path=/head/; revision=92913
* Back out my 'fix', resid is different for strategy than for writeAlfred Perlstein2001-11-301-2/+2
| | | | Notes: svn path=/head/; revision=87114
* Make the same fix for writes to RAW objects.Alfred Perlstein2001-11-301-2/+2
| | | | Notes: svn path=/head/; revision=87112
* write should return the number of bytes written, not 0 on success.Alfred Perlstein2001-11-301-1/+1
| | | | | | | | Submitted by: Jonathan Mini <mini@haikugeek.com> PR: kern/32350 Notes: svn path=/head/; revision=87111
* Add __FBSDID()s to libstandMatthew Dillon2001-09-301-0/+3
| | | | Notes: svn path=/head/; revision=84221
* This is libstand; a support library for standalone executables (eg. bootstrapMike Smith1998-08-201-0/+96
modules). Obtained from: NetBSD, with some architectural changes and many additions. Notes: svn path=/cvs2svn/branches/MSMITH/; revision=38451