freebsd-nq/sys
Matthew Dillon a37313d234 In rev 1.72 a situation related to write/mmap was fixed which could result
in a user process gaining visibility into the 'old' contents of a filesystem
block.  There were two cases:  (1) when uiomove() fails (user process issues
illegal write), and (2) when uiomove() overlaps a mmap() of the same file at
the same offset (fault -> recursive buffer I/O reads contents of old block).

Unfortunately 1.72 also had the unintended effect of forcing the filesystem
to do a read-before-write in the case of a full-block-write (non append case),
e.g. 'dd if=/dev/zero of=test.dat bs=1m count=256 conv=notrunc'.  This
destroys performance.. not only is a read forced for every write, but
clustering breaks as well.

The solution is to clear the buffer manually in the full-block case rather
then asking BALLOC to do it (BALLOC issues the read-before-write).  In the
partial-block case we want BALLOC to do it because the read-before-write
is necessary.  This patch should greatly improve database and news-feed
server performance.

Found by: MKI <mki@mozone.net>
MFC after:	3 days
2002-06-19 09:39:41 +00:00
..
alpha Squish the "could sleep with process lock" messages caused by calling 2002-06-19 06:39:25 +00:00
amd64 - Introduce the new M_NOVM option which tells uma to only check the currently 2002-06-17 22:02:41 +00:00
arm Move MI stuff out of MD param.h files. 2002-05-14 20:35:29 +00:00
boot #include <sys/disklabel.h> to get BBSIZE. 2002-06-11 10:19:59 +00:00
cam If we boot verbose, then print out 'interesting' CAM errors that otherwise 2002-06-07 23:51:30 +00:00
coda More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
compat Add a comment about how we should use vn_open() here instead of directly 2002-06-14 07:24:01 +00:00
conf A node that creates a device entry in /dev (yay devfs) 2002-06-18 21:32:33 +00:00
contrib - Add sanity check for argument. 2002-06-12 14:55:19 +00:00
crypto Fixed AES encryption algorithm bug 2002-05-24 07:26:17 +00:00
ddb Allow DB_SET() to set all fields in the ddb command structure. This 2002-06-05 19:00:02 +00:00
dev Removed unneeded files. 2002-06-18 22:51:26 +00:00
fs nmount'ify unionfs further by using separate options instead 2002-06-15 22:48:14 +00:00
geom Put geom_gpt.c under the GEOM option instead of having a special GEOM_GPT 2002-06-10 18:49:41 +00:00
gnu Convert ext2fs to nmount(2). 2002-05-24 17:38:01 +00:00
i4b Remote pci.h/NPCI usage from i4b code. 2002-06-13 06:04:28 +00:00
i386 - Introduce the new M_NOVM option which tells uma to only check the currently 2002-06-17 22:02:41 +00:00
ia64 - Fixup / remove obsolete comments. 2002-06-07 05:47:35 +00:00
isa After some comments from bde, rewrite the loops to avoid turning the 2002-05-14 21:28:45 +00:00
isofs/cd9660 Quick fix for non-unique inode numbers for hard links. We use the 2002-05-22 08:50:18 +00:00
kern Remove the compat bits for the mis-aligned struct disklabel on alpha, 2002-06-19 08:37:02 +00:00
libkern For some reason this didn't get added in my previous commit. 2002-05-29 21:58:12 +00:00
modules A node that creates a device entry in /dev (yay devfs) 2002-06-18 21:32:33 +00:00
net Remove so*_locked(), which were backed out by mistake. 2002-06-18 07:42:02 +00:00
netatalk Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netatm - Turn a DIAGNOSTIC check into a KASSERT(9). 2002-06-17 06:10:17 +00:00
netgraph A node that creates a device entry in /dev (yay devfs) 2002-06-18 21:32:33 +00:00
netinet Remove so*_locked(), which were backed out by mistake. 2002-06-18 07:42:02 +00:00
netinet6 Notify functions can destroy the pcb, so they have to return an 2002-06-14 08:35:21 +00:00
netipx Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netkey Remove so*_locked(), which were backed out by mistake. 2002-06-18 07:42:02 +00:00
netnatm Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netncp Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netns Fix bug which has been there since rev 1.1 where && was used instead of &. 2002-06-09 03:57:34 +00:00
netsmb Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
nfs Remove unused include. 2002-03-20 10:12:07 +00:00
nfsclient Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
nfsserver Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
pc98 Make the speed used by gdb over serial settable in the kernel configuration. 2002-06-18 21:30:37 +00:00
pccard hw.pcic.ignore_pci 2002-06-13 17:28:55 +00:00
pci Fix typo in the BSD copyright: s/withough/without/ 2002-06-02 20:05:59 +00:00
posix4 Change p_can{debug,see,sched,signal}()'s first argument to be a thread 2002-05-19 00:14:50 +00:00
powerpc - Fixup / remove obsolete comments. 2002-06-07 05:47:35 +00:00
rpc
security/lomac Get rid of warnings, there's no need to do preprocessor concatination of 2002-06-01 18:45:33 +00:00
sparc64 Sync with i386. 2002-06-18 01:11:04 +00:00
sys Remove the compat bits for the mis-aligned struct disklabel on alpha, 2002-06-19 08:37:02 +00:00
tools include systm.h in vnode_if.c so that panic is defined when we're doing 2002-05-04 02:35:13 +00:00
ufs In rev 1.72 a situation related to write/mmap was fixed which could result 2002-06-19 09:39:41 +00:00
vm o Replace GIANT_REQUIRED in vm_object_coalesce() by the acquisition and 2002-06-19 06:02:03 +00:00
Makefile Milestone #1 in cross-arch make releases. 2002-04-26 17:55:27 +00:00