summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Don't reset uio_offset to 0 before returning. Instead, refuse to servicedes2007-04-152-3/+7
| | | | | | | requests where uio_offset is not 0 to begin with. This fixes a long- standing bug where e.g. 'cat /proc/$$/regs' would loop forever. MFC after: 3 weeks
* Fix stupid syntax error - Pointy hat to me :-(rrs2007-04-151-7/+7
|
* Add macros to assert that the process is / isn't held in memory.des2007-04-151-0/+6
| | | | MFC after: 3 weeks
* - Add more comments to sctps_stats struture in sctp_uio.hrrs2007-04-155-266/+293
| | | | | | | | | | | | | | | | - Fix bug that prevented EEOR mode from working and simplified the can_we_split code in the process. - Reduce lock contention for the tcb_send_lock. I did this especially for EEOR mode, still need to look at why I need a lock when removing from the tailq and the ->next is NOT null. A lock fixes it but it implies a bug yet exists. - Activated Andre's proposed changes to better use the mbuf infrastructure. - Fixed places that were not using the aloc macro's to take advantage of the per assoc cache. - Adds ifdef fix so any logging will enable stat_logging to get the right data structures in place (suggested by Max Laier).
* MFp4: Start DNLC after desiredvnodes variable is initialized.pjd2007-04-152-4/+4
| | | | | | | Before this change if zfs.ko was loaded by the loader, DNLC was automatically disabled. Reported by: Zephiris <zephiris@gmail.com>
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-1551-995/+1275
| | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
* back out option to disable packet zonekmacy2007-04-151-6/+0
| | | | Requested by: sam
* suck in more of busdma to enable more efficient mappingskmacy2007-04-151-58/+164
| | | | kill redundant INVARIANTS check
* Add sysctl for disabling/enabling mbuf chain collapsingkmacy2007-04-152-11/+8
| | | | remove map creation before calling bus_dmamap_load_mvec_sg
* Implement ZERO_COPY_SOCKETS check in a way that doesn't make LINT unhappykmacy2007-04-151-5/+6
|
* Fix RAID-Z resilvering.pjd2007-04-142-4/+32
| | | | Obtained from: OpenSolaris
* Add support for mbuf iovec in the TX pathkmacy2007-04-142-40/+87
|
* add reference count pointer to mbuf ioveckmacy2007-04-142-161/+381
| | | | | | | | implement robust version of m_collapse add support for sf_buf add fix for m_iovappend add calls to m_sanity under INVARIANTS fix m_freem_vec to correctly travese the mbuf iovec chain
* hide static declarationkmacy2007-04-141-2/+4
| | | | remove extra white space
* remove now invalid check from m_sanitykmacy2007-04-141-10/+5
| | | | panic on m_sanity check failure with INVARIANTS
* Add option for disabling allocation from the packet zonekmacy2007-04-142-0/+5
|
* pad out m_hdr to make pkthdr word-alignedkmacy2007-04-141-1/+8
| | | | | | shuffle pkthdr.len so that pkthdr.header is aligned without compiler added padding Reviewed by: rwatson, andre, sam
* Fix a typeo - unbreak the build.mlaier2007-04-141-1/+1
|
* o Add bsm and security to a list of cscope dirs.maxim2007-04-141-3/+3
|
* MFp4: Hmm, it seems to work now.pjd2007-04-142-16/+2
|
* Further pseudofs improvements:des2007-04-146-62/+59
| | | | | | | | | | | | | | | | | | | | | | | | | The pfs_info mutex is only needed to lock pi_unrhdr. Everything else in struct pfs_info is modified only while Giant is held (during vfs_init() / vfs_uninit()); add assertions to that effect. Simplify pfs_destroy somewhat. Remove superfluous arguments from pfs_fileno_{alloc,free}(), and the assertions which were added in the previous commit to ensure they were consistent. Assert that Giant is held while the vnode cache is initialized and destroyed. Also assert that the cache is empty when it is destroyed. Rename the vnode cache mutex for consistency. Fix a long-standing bug in pfs_getattr(): it would uncritically return the node's pn_fileno as st_ino. This would result in st_ino being 0 if the node had not previously been visited by readdir(), and also in an incorrect st_ino for process directories and any files contained therein. Correct this by abstracting the fileno manipulations previously done in pfs_readdir() into a new function, pfs_fileno(), which is used by both pfs_getattr() and pfs_readdir().
* MFp4: Use max_ncpus, which is used in other places in the code.pjd2007-04-142-2/+2
|
* MFp4: Add more debug, so we can see if zpool.cache was loaded or why itpjd2007-04-142-6/+22
| | | | wasn't loaded.
* MFp4: Allow to tune vfs.zfs.debug from loader.conf.pjd2007-04-142-0/+2
|
* MFp4: - Allow to tune number of spa_zio_* threads.pjd2007-04-142-14/+34
| | | | | | | - Reduce default number of spa_zio_* threads to N*spa_zio_issue plus N*spa_zio_intr threads per ZIO type, where N is the number of CPUs. - Put ZIO type number in thread's name.
* Some Linux applications (ping) pass a non-NULL msg_control argument torwatson2007-04-141-0/+10
| | | | | | | | sendmsg() while using a 0-length msg_controllen. This isn't allowed in the FreeBSD system call ABI, so detect this case and set msg_control to NULL. This allows Linux ping to work. Submitted by: rdivacky
* - fix source address selection when picking an acceptable addressrrs2007-04-1413-432/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - name change of prefered -> preferred - CMT fast recover code added. - Comment fixes in CMT. - We were not giving a reason of cant_start_asoc per socket api if we failed to get init/or/cookie to bring up an assoc. Change so we don't just give a generic "comm lost" but look at actual states of dying assoc. - change "crc32" arguments to "crc32c" to silence strict/noisy compiler warnings when crc32() is also declared - A few minor tweaks to get the portable stuff truely portable for sctp6_usrreq.c :-D - one-2-one style vrf match problem. - window recovery would leave chks marked for retran during window probes on the sent queue. This would then cause an out-of-order problem and assure that the flight size "problem" would occur. - Solves a flight size logging issue that caused rwnd overruns, flight size off as well as false retransmissions.g - Macroize the up and down of flight size. - Fix a ECNE bug in its counting. - The strict_sacks options was causing aborts when window probing was active, fix to make strict sacks a bit smarter about what the next unsent TSN is. - Fixes a one-2-one wakeup bug found by Martin Kulas. - If-defed out form, Andre's copy routines pending his commit of at least m_last().. need to adjust for 6.2 as well.. since m_last won't exist. Reviewed by: gnn
* In member interface detach event handler, do not attempt to free statebms2007-04-141-1/+9
| | | | | | | | which has already been freed by in_ifdetach(). With this cumulative change, the removal of a member interface will not cause a panic in pfsync(4). Requested by: yar PR: 86848
* Fix jails and jail-friendly file systems handling:pjd2007-04-133-5/+25
| | | | | | | | - We need to allow for PRIV_VFS_MOUNT_OWNER inside a jail. - Move security checks to vfs_suser() and deny unmounting and updating for jailed root from different jails, etc. OK'ed by: rwatson
* Fix overflow, which was causing endless loops when 32bit machine had morepjd2007-04-134-6/+6
| | | | | | | | | | than 2GB of RAM. This was because our physmem is long and 'physmem*PAGESIZE' can be negative for more than 2GB of memory. Reported by: Andrey V. Elsukov <bu7cher@yandex.ru> It is not yet tested by Andrey, so there can be other problems, but this was definiately a bug, so I'm committing a fix now.
* o Extend the list of supported CDMA-2000 terminals.maxim2007-04-131-2/+2
| | | | | Submitted by: R.Mahmatkhanov MFC after: 10 days
* Eliminate the misuse of PG_FRAME to truncate a virtual address to a virtualalc2007-04-132-4/+4
| | | | | | page boundary. Reviewed by: ru@
* Fix the handling of IPv6 addresses for subject and process BSM auditcsjp2007-04-138-34/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tokens. Currently, we do not support the set{get}audit_addr(2) system calls which allows processes like sshd to set extended or ip6 information for subject tokens. The approach that was taken was to change the process audit state slightly to use an extended terminal ID in the kernel. This allows us to store both IPv4 IPv6 addresses. In the case that an IPv4 address is in use, we convert the terminal ID from an struct auditinfo_addr to a struct auditinfo. If getaudit(2) is called when the subject is bound to an ip6 address, we return E2BIG. - Change the internal audit record to store an extended terminal ID - Introduce ARG_TERMID_ADDR - Change the kaudit <-> BSM conversion process so that we are using the appropriate subject token. If the address associated with the subject is IPv4, we use the standard subject32 token. If the subject has an IPv6 address associated with them, we use an extended subject32 token. - Fix a couple of endian issues where we do a couple of byte swaps when we shouldn't be. IP addresses are already in the correct byte order, so reading the ip6 address 4 bytes at a time and swapping them results in in-correct address data. It should be noted that the same issue was found in the openbsm library and it has been changed there too on the vendor branch - Change A_GETPINFO to use the appropriate structures - Implement A_GETPINFO_ADDR which basically does what A_GETPINFO does, but can also handle ip6 addresses - Adjust get{set}audit(2) syscalls to convert the data auditinfo <-> auditinfo_addr - Fully implement set{get}audit_addr(2) NOTE: This adds the ability for processes to correctly set extended subject information. The appropriate userspace utilities still need to be updated. MFC after: 1 month Reviewed by: rwatson Obtained from: TrustedBSD
* Fix vnodes starvation caused by DNLC (ZFS name cache):pjd2007-04-132-2/+40
| | | | | | | | - Tune number of namecache entires better (based on desiredvnodes). - Handle vfs_lowvnodes event by releasing requested number of name cache entries, but no less than 5%. Reported by: simokawa
* When we are running low on vnodes, there is currently no way to ask otherpjd2007-04-132-0/+5
| | | | | subsystems to release some vnodes. Implement backpressure based on vfs_lowvnodes event (similar to vm_lowmem for memory).
* MFp4: Synchronize with vendor (mostly 'zfs rename -r').pjd2007-04-1212-40/+284
|
* MFp4: Bring back comments.pjd2007-04-124-358/+358
| | | | Requested by: jhb
* -) Correct sdcount for a plex when removing or adding subdisks.le2007-04-123-3/+93
| | | | | | -) Set correct sizes for plexes and volumes a subdisk has been removed. Submitted by: Ulf Lilleengen <lulf_AT_freebsd.org>
* Avoid infinite loop if the device string given for a drivele2007-04-121-6/+3
| | | | | | only consists of "/". Submitted by: Ulf Lilleengen <lulf_AT_freebsd.org>
* MFamd64alc2007-04-121-0/+1
| | | | Define PGEX_RSV.
* Fix PAE on SMP by enabling EFER_NXE on all APs.ru2007-04-121-0/+10
| | | | | Reported by: kris Diagnosed by: alc
* restore sense to get_imm_packetkmacy2007-04-121-6/+4
| | | | MFC after: 3 days
* switch over to per-txq dma tag to facilitate parallelism on TXkmacy2007-04-121-12/+12
| | | | MFC after: 3 days
* explicitly check TSO flagkmacy2007-04-121-12/+8
| | | | | | | don't clear and then set M_PKTHDR, m_gethdr sets it correctly improve error handling on m_gethdr failure MFC after: 3 days
* Add ETHER_HDR_LEN to hardware accepted mtukmacy2007-04-121-3/+3
| | | | MFC after: 3 days
* Fix a case where the multicast addresses were not removed from some ports. Thethompsa2007-04-121-32/+49
| | | | | first port to be removed from the trunk would free the multicast list so subsequent removed ports didnt have their multicast addresses removed.
* Add m_last() inline function.andre2007-04-111-0/+10
|
* Add a flag to struct pfs_vdata to mark the vnode as dead (e.g. process-des2007-04-115-51/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specific nodes when the process exits) Move the vnode-cache-walking loop which was duplicated in pfs_exit() and pfs_disable() into its own function, pfs_purge(), which looks for vnodes marked as dead and / or belonging to the specified pfs_node and reclaims them. Note that this loop is still extremely inefficient. Add a comment in pfs_vncache_alloc() explaining why we have to purge the vnode from the vnode cache before returning, in case anyone should be tempted to remove the call to cache_purge(). Move the special handling for pfstype_root nodes into pfs_fileno_alloc() and pfs_fileno_free() (the root node's fileno must always be 2). This also fixes a bug where pfs_fileno_free() would reclaim the root node's fileno, triggering a panic in the unr code, as that fileno was never allocated from unr to begin with. When destroying a pfs_node, release its fileno and purge it from the vnode cache. I wish we could put off the call to pfs_purge() until after the entire tree had been destroyed, but then we'd have vnodes referencing freed pfs nodes. This probably doesn't matter while we're still under Giant, but might become an issue later. When destroying a pseudofs instance, destroy the tree before tearing down the fileno allocator. In pfs_mount(), acquire the mountpoint interlock when required. MFC after: 3 weeks
* Remove obsolete comment about privileges: SUSER_ALLOWJAIL is no longer setrwatson2007-04-111-2/+0
| | | | in this code.
* Remove now-obsolete comment regarding mqueue privileges in jail.rwatson2007-04-111-4/+0
|
OpenPOWER on IntegriCloud