aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* This fixes a large number of bugs in our NFS client side code. A recentMatthew Dillon2001-12-146-11/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit by Kirk also fixed a softupdates bug that could easily be triggered by server side NFS. * An edge case with shared R+W mmap()'s and truncate whereby the system would inappropriately clear the dirty bits on still-dirty data. (applicable to all filesystems) THIS FIX TEMPORARILY DISABLED PENDING FURTHER TESTING. see vm/vm_page.c line 1641 * The straddle case for VM pages and buffer cache buffers when truncating. (applicable to NFS client side) * Possible SMP database corruption due to vm_pager_unmap_page() not clearing the TLB for the other cpu's. (applicable to NFS client side but could effect all filesystems). Note: not considered serious since the corruption occurs beyond the file EOF. * When flusing a dirty buffer due to B_CACHE getting cleared, we were accidently setting B_CACHE again (that is, bwrite() sets B_CACHE), when we really want it to stay clear after the write is complete. This resulted in a corrupt buffer. (applicable to all filesystems but probably only triggered by NFS) * We have to call vtruncbuf() when ftruncate()ing to remove any buffer cache buffers. This is still tentitive, I may be able to remove it due to the second bug fix. (applicable to NFS client side) * vnode_pager_setsize() race against nfs_vinvalbuf()... we have to set n_size before calling nfs_vinvalbuf or the NFS code may recursively vnode_pager_setsize() to the original value before the truncate. This is what was causing the user mmap bus faults in the nfs tester program. (applicable to NFS client side) * Fix to softupdates (see ufs/ffs/ffs_inode.c 1.73, commit made by Kirk). Testing program written by: Avadis Tevanian, Jr. Testing program supplied by: jkh / Apple (see Dec2001 posting to freebsd-hackers with Subject 'NFS: How to make FreeBS fall on its face in one easy step') MFC after: 1 week Notes: svn path=/head/; revision=87834
* Add maxusers auto-sizing description to NOTES file for -currentMatthew Dillon2001-12-142-2/+6
| | | | Notes: svn path=/head/; revision=87830
* o Wording fix in comment.Robert Watson2001-12-141-1/+1
| | | | | | | Submitted by: tanimura via p4 Notes: svn path=/head/; revision=87828
* Minimize the time necessary to suspend operations on a filesystemKirk McKusick2001-12-144-96/+209
| | | | | | | | | | | | | | | | | | | | | when taking a snapshot. The two time consuming operations are scanning all the filesystem bitmaps to determine which blocks are in use and scanning all the other snapshots so as to be able to expunge their blocks from the view of the current snapshot. The bitmap scanning is broken into two passes. Before suspending the filesystem all bitmaps are scanned. After the suspension, those bitmaps that changed after being scanned the first time are rescanned. Typically there are few bitmaps that need to be rescanned. The expunging of other snapshots is now done after the suspension is released by observing that we can easily identify any blocks that were allocated to them after the suspension (they will be maked as `not needing to be copied' in the just created snapshot). For all the gory details, see the ``Running fsck in the Background'' paper in the Usenix BSDCon 2002 Conference Proceedings, pages 55-64. Notes: svn path=/head/; revision=87827
* Convert C++ style comments to proper C ones.David E. O'Brien2001-12-1316-72/+87
| | | | | | | | Clean up C comments just a tad. Fix ID's. Notes: svn path=/head/; revision=87826
* If we were called to allocate a vnode that is not associated with aPeter Wemm2001-12-131-0/+2
| | | | | | | mount point, do not dereference the NULL mp argument. Notes: svn path=/head/; revision=87823
* Remove stale prototype for sonewconn3().Brian Feldman2001-12-131-2/+0
| | | | Notes: svn path=/head/; revision=87822
* o Back out portions of 1.50 and 1.47, eliminating sonewconn3() andRobert Watson2001-12-133-29/+3
| | | | | | | | | | | | | | | always deriving the credential for a newly accepted connection from the listen socket. Previously, the selection of the credential depended on the protocol: UNIX domain sockets would use the connecting process's credential, and protocols supporting a creation of the socket before the receiving end called accept() would use the listening socket. After this change, it is always the listening credential. Reviewed by: green Notes: svn path=/head/; revision=87821
* Limit maxprocperuid to 9/10 maxproc, and limit maxfilesperproc to 9/10Mike Silbersack2001-12-131-2/+2
| | | | | | | | | | maxfiles. This should make local resource exhaustion attacks easier to handle with a non-tweaked setup. MFC after: 3 days Notes: svn path=/head/; revision=87817
* Use C comments instead of C++ comments.John Baldwin2001-12-133-24/+24
| | | | | | | Reported by: gcc30 Notes: svn path=/head/; revision=87816
* Tone down and remove some obnoxious warnings that are slightly overkill.Jonathan Lemon2001-12-131-10/+1
| | | | Notes: svn path=/head/; revision=87799
* Add module dependency on libmchain.Sheldon Hearn2001-12-131-0/+2
| | | | | | | | | With this change, mounting an smb share (using mount_smb, which is not yet included in the tree) without any of smbfs, libiconv or libmchain compiled into the kernel or loaded works. Notes: svn path=/head/; revision=87798
* Use ANSI C string contatenation instead of a multi-line string literal.John Baldwin2001-12-131-4/+4
| | | | | | | Reported by: gcc30 Notes: svn path=/head/; revision=87797
* Comment tokens after #undef <macroname> and #endif.John Baldwin2001-12-132-5/+5
| | | | | | | Reported by: gcc30 Notes: svn path=/head/; revision=87796
* Use a per-thread variable for keeping state when a thread is processingJohn Baldwin2001-12-132-10/+9
| | | | | | | | | | | a KTR log entry. Any KTR requests made while working on an entry are ignored/discarded to prevent recursion. This is a better fix for the hack to futz with the CPU mask and call getnanotime() if KTR_LOCK or KTR_WITNESS was on. It also covers the actual formatting of the log entry including dumping it to the display which the earlier hacks did not. Notes: svn path=/head/; revision=87793
* When a file is partially truncated, we first check to see if theKirk McKusick2001-12-131-0/+12
| | | | | | | | | | | | | | | | | new file end will land in the middle of a file hole. Since the last block of a file must always be allocated, the hole is filled by allocating a block at that location. If the hole being filled is a direct block, then the truncation may eventually reduce the full sized block down to a fragment. When running with soft updates, it is necessary to FSYNC the file after allocating the block and before creating the fragment to avoid triggering a soft updates inconsistency when the block unexpectedly shrinks. Found by: Matthew Dillon <dillon@apollo.backplane.com> MFC after: 1 week Notes: svn path=/head/; revision=87782
* Undo one of my last minute changes; move sc_iss up earlier so itJonathan Lemon2001-12-131-1/+1
| | | | | | | is initialized in case we take the T/TCP path. Notes: svn path=/head/; revision=87780
* Fix up tabs from cut&n&paste.Jonathan Lemon2001-12-131-8/+8
| | | | Notes: svn path=/head/; revision=87779
* Fix up tabs in comments.Jonathan Lemon2001-12-132-8/+8
| | | | Notes: svn path=/head/; revision=87778
* Minor style fixes.Jonathan Lemon2001-12-131-2/+2
| | | | Notes: svn path=/head/; revision=87777
* Minor style fix.Jonathan Lemon2001-12-131-2/+2
| | | | Notes: svn path=/head/; revision=87776
* Roll firmware to latest offerings... Fixes a number of f/w relatedMatt Jacob2001-12-132-9047/+12601
| | | | | | | | | bugs. MFC after: 1 week Notes: svn path=/head/; revision=87771
* Sync to pccarddevs 1.25Warner Losh2001-12-121-2/+8
| | | | Notes: svn path=/head/; revision=87758
* Move LINKSYS2 to its correct numerical location.Warner Losh2001-12-121-1/+5
| | | | | | | Add BONDWELL B236 Game Card Joystick. A PC Card joystick card. Notes: svn path=/head/; revision=87757
* Add DIVA USB mp3 player.Maxim Sobolev2001-12-123-0/+8
| | | | | | | | Submitted by: Olexander Kunytsa <kunia@x-telecom.net> MFC after: 3 days Notes: svn path=/head/; revision=87747
* MFi386: revision 1.35 (Add support for writing to BIOS disks)Yoshihiro Takahashi2001-12-121-4/+221
| | | | Notes: svn path=/head/; revision=87734
* MFi386: revision 1.485 (the previous commit is not completely)Yoshihiro Takahashi2001-12-122-22/+26
| | | | Notes: svn path=/head/; revision=87730
* Connect libiconv to the build.Sheldon Hearn2001-12-121-0/+1
| | | | | | | | | Recent work by fjoe and bp has fixed smbfs. The smbfs module can now be loaded once libiconv and libmchain have been loaded, and works! Notes: svn path=/head/; revision=87727
* Fix select on named pipes without a reader.Alfred Perlstein2001-12-121-1/+0
| | | | | | | | PR: kern/19871 MFC after: 1 month Notes: svn path=/head/; revision=87725
* Axe an unneeded PCPU_SET(spinlocks, NULL) that I missed earlier.John Baldwin2001-12-126-6/+0
| | | | Notes: svn path=/head/; revision=87721
* - Move _jail sysctl node underneath _kern_security in order to standardizeAndrew R. Reiter2001-12-121-4/+5
| | | | | | | | | | | | where our security related sysctl tuneables are located. Also, this will help if/when we move _security node out from under _kern as to help make _kern less cluttered. Approved by: rwatson Review by: rwatson Notes: svn path=/head/; revision=87716
* Overhaul the per-CPU support a bit:John Baldwin2001-12-11107-1596/+850
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - The MI portions of struct globaldata have been consolidated into a MI struct pcpu. The MD per-CPU data are specified via a macro defined in machine/pcpu.h. A macro was chosen over a struct mdpcpu so that the interface would be cleaner (PCPU_GET(my_md_field) vs. PCPU_GET(md.md_my_md_field)). - All references to globaldata are changed to pcpu instead. In a UP kernel, this data was stored as global variables which is where the original name came from. In an SMP world this data is per-CPU and ideally private to each CPU outside of the context of debuggers. This also included combining machine/globaldata.h and machine/globals.h into machine/pcpu.h. - The pointer to the thread using the FPU on i386 was renamed from npxthread to fpcurthread to be identical with other architectures. - Make the show pcpu ddb command MI with a MD callout to display MD fields. - The globaldata_register() function was renamed to pcpu_init() and now init's MI fields of a struct pcpu in addition to registering it with the internal array and list. - A pcpu_destroy() function was added to remove a struct pcpu from the internal array and list. Tested on: alpha, i386 Reviewed by: peter, jake Notes: svn path=/head/; revision=87702
* Explicitly decode GetAllNext SNS Response back *as*Matt Jacob2001-12-112-4/+59
| | | | | | | | | | a GetAllNext response. Otherwise, we won't unswizzle it correctly. This was found on linux/PPC. This mandated creating another inline: isp_get_gan_response. Notes: svn path=/head/; revision=87671
* Add VOP_GETEXTATTR(9) passthrough support to pseudofs.Brian Feldman2001-12-112-0/+55
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=87670
* Remove an obsolete prototype for procfs_kmemaccess().Dag-Erling Smørgrav2001-12-111-3/+0
| | | | | | | Submitted by: rwatson Notes: svn path=/head/; revision=87669
* Correct a comment that should have been updated in rev 1.43, whenSheldon Hearn2001-12-111-2/+2
| | | | | | | | | | CIRCLEQ was removed. PR: kern/32688 Submitted by: Jordan DeLong <fracture@allusion.net> Notes: svn path=/head/; revision=87651
* Fix boot -p for DDBless kernelsGuido van Rooij2001-12-111-0/+6
| | | | | | | Pointed out by: John Hay <jhay@icomtek.csir.co.za> Notes: svn path=/head/; revision=87649
* Wrap Dangerously Dedicated printf under if (bootverbose)Peter Wemm2001-12-111-2/+4
| | | | Notes: svn path=/head/; revision=87642
* Avoid an unnecessary copy of a packet if it is already in a single mbuf.Luigi Rizzo2001-12-114-4/+14
| | | | | | | | | | | Introduce an additional device flag for those NICs which require the transmit buffers to be aligned to 32-bit boundaries. (the equivalen fix for STABLE is slightly simpler because there are no supported chips which require this alignment there.) Notes: svn path=/head/; revision=87638
* Delete some leftover code from a bygone age. We dont have an array ofPeter Wemm2001-12-112-22/+2
| | | | | | | IdlePTDS anymore and dont to the PTD[MPPTDI] swapping etc. Notes: svn path=/head/; revision=87637
* - Add 'fwrite' and 'fseek' words for writing to and seeking on files.John Baldwin2001-12-118-27/+96
| | | | | | | | | | | | | | | | - Change the 'fopen' keyword to accept a mode parameter. Note that this will break existing 4th scripts that use fopen. Thus, the loader version has been bumped and loader.4th has been changed to check for a sufficient version on i386 and alpha. Be sure that you either do a full world build or install or full build and install of sys/boot after this since loader.old won't work with the new 4th files and vice versa. PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc. Notes: svn path=/head/; revision=87636
* Major restructuring for swizzling to the request queue and unswizzling fromMatt Jacob2001-12-119-579/+1500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have a complete set of inline functions in isp_inline.h. Each platform is responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32} macros. The reason this needs to be done is that we need to have a single set of functions that will work correctly on multiple architectures for both little and big endian machines. It also needs to work correctly in the case that we have the request or response queues in memory that has to be treated specially (e.g., have ddi_dma_sync called on it for Solaris after we update it or before we read from it). It also has to handle the SBus cards (for platforms that have them) which, while on a Big Endian machine, do *not* require *most* of the request/response queue entry fields to be swizzled or unswizzled. One thing that falls out of this is that we no longer build requests in the request queue itself. Instead, we build the request locally (e.g., on the stack) and then as part of the swizzling operation, copy it to the request queue entry we've allocated. I thought long and hard about whether this was too expensive a change to make as it in a lot of cases requires an extra copy. On balance, the flexbility is worth it. With any luck, the entry that we build locally stays in a processor writeback cache (after all, it's only 64 bytes) so that the cost of actually flushing it to the memory area that is the shared queue with the PCI device is not all that expensive. We may examine this again and try to get clever in the future to try and avoid copies. Another change that falls out of this is that MEMORYBARRIER should be taken a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the entry being added. But there had been many other places this had been missing. It's now very important that it be done. Additional changes: Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry, the iptr value that gets returned is the value we intend to eventually plug into the ISP registers as the entry *one past* the last one we've written- *not* the current entry we're updating. All along we've been calling sync functions on the wrong index value. Argh. The 'fix' here is to rename all 'iptr' variables as 'nxti' to remember that this is the 'next' pointer- not the current pointer. Devote a single bit to mboxbsy- and set aside bits for output mbox registers that we need to pick up- we can have at least one command which does not have any defined output registers (MBOX_EXECUTE_FIRMWARE). MFC after: 2 weeks Notes: svn path=/head/; revision=87635
* Add support for writing blocks to the loader's disk cache.John Baldwin2001-12-111-21/+92
| | | | | | | | | PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc. Notes: svn path=/head/; revision=87634
* Add support for writing to BIOS disks.John Baldwin2001-12-111-3/+169
| | | | | | | | | PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc. Notes: svn path=/head/; revision=87633
* Missed an assignment of arg6 in previous commit.David E. O'Brien2001-12-101-0/+1
| | | | Notes: svn path=/head/; revision=87627
* Get rid of irritating (bogus) message:Guido van Rooij2001-12-101-2/+5
| | | | | | | | | | | pcm0: ac97 codec failed to reset extended mode (0, got 80) This was due to not masking off the correct extended function bits in the read value from the extended status reg. MFC after: 2 days Notes: svn path=/head/; revision=87623
* Adjust for the addition of CTR6.David E. O'Brien2001-12-101-1/+1
| | | | Notes: svn path=/head/; revision=87622
* Complete the CTR6 addition (and TR6 and ITR6...)David E. O'Brien2001-12-101-11/+11
| | | | Notes: svn path=/head/; revision=87621
* Add new boot flag to i386 boot: -p.Guido van Rooij2001-12-108-2/+37
| | | | | | | | | | | | | | | This flag adds a pausing utility. When ran with -p, during the kernel probing phase, the kernel will pause after each line of output. This pausing can be ended with the '.' key, and is automatically suspended when entering ddb. This flag comes in handy at systems without a serial port that either hang during booting or reser. Reviewed by: (partly by jlemon) MFC after: 1 week Notes: svn path=/head/; revision=87620
* Regen from usbdevs rev 1.70: added some AGFA scannersSheldon Hearn2001-12-102-2/+51
| | | | Notes: svn path=/head/; revision=87611