Commit Graph

63198 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
6704017a15 MFp4: Synchronize with vendor (mostly 'zfs rename -r'). 2007-04-12 23:16:02 +00:00
Pawel Jakub Dawidek
1da61b3665 MFp4: Bring back comments.
Requested by:	jhb
2007-04-12 23:14:25 +00:00
Lukas Ertl
a2237c41fc -) Correct sdcount for a plex when removing or adding subdisks.
-) Set correct sizes for plexes and volumes a subdisk has been removed.

Submitted by:   Ulf Lilleengen <lulf_AT_freebsd.org>
2007-04-12 17:54:35 +00:00
Lukas Ertl
9e357b05da Avoid infinite loop if the device string given for a drive
only consists of "/".

Submitted by:  Ulf Lilleengen <lulf_AT_freebsd.org>
2007-04-12 17:40:44 +00:00
Alan Cox
1434c1f34b MFamd64
Define PGEX_RSV.
2007-04-12 17:00:56 +00:00
Ruslan Ermilov
f76f6cfd25 Fix PAE on SMP by enabling EFER_NXE on all APs.
Reported by:	kris
Diagnosed by:	alc
2007-04-12 11:05:24 +00:00
Kip Macy
aa84193acf restore sense to get_imm_packet
MFC after: 3 days
2007-04-12 04:48:54 +00:00
Kip Macy
98d6fba71d switch over to per-txq dma tag to facilitate parallelism on TX
MFC after: 3 days
2007-04-12 04:31:44 +00:00
Kip Macy
dd782506d8 explicitly check TSO flag
don't clear and then set M_PKTHDR, m_gethdr sets it correctly
improve error handling on m_gethdr failure

MFC after: 3 days
2007-04-12 03:33:30 +00:00
Kip Macy
23ed7b513f Add ETHER_HDR_LEN to hardware accepted mtu
MFC after: 3 days
2007-04-12 03:07:24 +00:00
Andrew Thompson
575156b607 Fix a case where the multicast addresses were not removed from some ports. The
first port to be removed from the trunk would free the multicast list so
subsequent removed ports didnt have their multicast addresses removed.
2007-04-12 01:58:57 +00:00
Andre Oppermann
dfd389bf64 Add m_last() inline function. 2007-04-11 23:13:12 +00:00
Dag-Erling Smørgrav
15bad11fdb Add a flag to struct pfs_vdata to mark the vnode as dead (e.g. process-
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
2007-04-11 22:40:57 +00:00
Robert Watson
949da0d8f8 Remove obsolete comment about privileges: SUSER_ALLOWJAIL is no longer set
in this code.
2007-04-11 16:31:02 +00:00
Robert Watson
94b94b2b49 Remove now-obsolete comment regarding mqueue privileges in jail. 2007-04-11 16:22:59 +00:00
Ruslan Ermilov
7480de4305 Make "struct tcp_timer" visible only to the kernel, and unbreak world. 2007-04-11 14:08:42 +00:00
John Baldwin
e403490aa6 Fix m_freem_vec() to actually traverse the mbuf chain. This avoids
double free's and an infinite loop.

CID:		1834
Found by:	Coverity Prevent (tm)
2007-04-11 13:47:24 +00:00
John Baldwin
4796ce4956 Group the loop to acquire/release Giant with the WITNESS_SAVE/RESTORE under
a single conditional.  The two operations are linked, but since the link
is not very direct, Coverity can't see it.  Humans might also miss the
link as well.  So, this isn't fixing any actual bugs, just improving
readability.

CID:		1787 (likely others as well)
Found by:	Coverity Prevent (tm)
2007-04-11 13:44:55 +00:00
Ruslan Ermilov
9fd6e3d4a4 This commit was generated by cvs2svn to compensate for changes in r168616,
which included commits to RCS files with non-trunk default branches.
2007-04-11 11:09:18 +00:00
Ruslan Ermilov
1859f337c4 Unbreak world build. 2007-04-11 11:09:18 +00:00
Andre Oppermann
b8152ba793 Change the TCP timer system from using the callout system five times
directly to a merged model where only one callout, the next to fire,
is registered.

Instead of callout_reset(9) and callout_stop(9) the new function
tcp_timer_activate() is used which then internally manages the callout.

The single new callout is a mutex callout on inpcb simplifying the
locking a bit.

tcp_timer() is the called function which handles all race conditions
in one place and then dispatches the individual timer functions.

Reviewed by:	rwatson (earlier version)
2007-04-11 09:45:16 +00:00
Nate Lawson
1b96d500fb Put some overly verbose prints under bootverbose. This is on the vendor
branch but we need to work out a different interface with the vendor.
2007-04-11 02:03:36 +00:00
Nate Lawson
c1149e97bb This commit was generated by cvs2svn to compensate for changes in r168609,
which included commits to RCS files with non-trunk default branches.
2007-04-11 02:03:36 +00:00
Pyun YongHyeon
b5898b804f Add work around for hardware Tx checksum offload bug in Yukon II.
Yukon II generated corrupted TCP checksum for short TCP packets
that's less than 60 bytes in size(e.g. window probe packet, pure ACK
packet etc). Padding the frame with zeros to make the frame minimum
ethernet frame size didn't work at all. Instead of dropping Tx
checksum offload support we calculate TCP checksum with S/W method
when we encounter short TCP frames.
Fortunately it seems that short UDP datagrams appear to be handled
correctly by Yukon II.

While I'm here simplify ethernet/VLAN header size calculation logic.

PR:	111384
2007-04-11 00:47:29 +00:00
Pawel Jakub Dawidek
7f64b05f79 Move rpc/types.h under sys/, as this is used by ZFS kernel module.
Repo-copied by:	simon
2007-04-10 22:10:16 +00:00
Wojciech A. Koszek
f7caeade24 strchr() and strrchr() are already present in the kernel, but with less
popular names. Hence:

- comment current index() and rindex() functions, as these serve the same
  functionality as, respectively, strchr() and strrchr() from userland;
- add inlined version of strchr() and strrchr(), as we tend to use them more
  often;
- remove str[r]chr() definitions from ZFS code;

Reviewed by:	pjd
Approved by:	cognet (mentor)
2007-04-10 21:42:12 +00:00
Pawel Jakub Dawidek
fef2a25971 Remove trailing '.' for consistency! 2007-04-10 21:40:13 +00:00
Scott Long
6eef46be3b Whitespace fixes 2007-04-10 21:37:37 +00:00
Marius Strobl
5abeece6ab Let brgphy(4) attach for the Broadcom BCM5755 ASIC based chipsets
as well.

Obtained from:	OpenBSD
MFC after:	1 week
2007-04-10 20:43:23 +00:00
Marius Strobl
a404cff674 On i386 compile the back-end with EISA support as well as the EISA
front-end if the dpt(4) module is built along with a kernel that
includes eisa(4) or when compiling it stand-alone (logic based on
the corresponding ISA logic in sys/modules/sound/sound/Makefile).
As as side-effect this fixes the stand-alone build of the dpt(4)
module after dpt.h 1.17, dpt_eisa.c 1.22 and dpt_scsi.c 1.55.

Breakage reported by:	n_hibma
2007-04-10 20:33:31 +00:00
Scott Long
715ab2120d A fix for the SG_GET_TIMEOUT function slipped into a previous commit by
accident.  Remove the text describing the problem as it is no longer
relevant.  Also give real implementations for the GET and SET ioctls.
2007-04-10 20:03:42 +00:00
Pawel Jakub Dawidek
57bcf75fd2 Add UFS_GJOURNAL options to the GENERIC kernel.
Approved by:	re (kensmith)
2007-04-10 16:49:41 +00:00
Robert Watson
e8c5c7a635 Update comment regarding how we check privilege on FreeBSD: we now use
priv_check().
2007-04-10 16:09:00 +00:00
Robert Watson
4b08405682 Allow PRIV_NETINET_REUSEPORT in jail. 2007-04-10 15:59:49 +00:00
Robert Watson
6493245ded Add a new privilege, PRIV_NETINET_REUSEPORT, which will replace superuser
checks to see whether bind() can reuse a port/address combination while
it's already in use (for some definition of use).
2007-04-10 15:58:38 +00:00
Robert Watson
cc807dbd0a Remove unnecessary suser() check in the sysctl to set up ath_hal
logging: the sysctl framework will already have checked for privilege
if a sysctl value is being set.

Discussed a long time ago with:	sam
2007-04-10 15:48:45 +00:00
Robert Watson
9956b3f5e4 Do allow POSIX mqueue unlink privilege inside a jail, as we all all
other POSIX mqueue privileges inside a jail.
2007-04-10 15:40:27 +00:00
Pawel Jakub Dawidek
08be819487 Minor style cleanups (mostly removal of trailing whitespaces). 2007-04-10 15:29:37 +00:00
Pawel Jakub Dawidek
21ff8c6715 Correct typos. 2007-04-10 15:22:40 +00:00
Pawel Jakub Dawidek
1b6e2c02fe MFp4: Allow to set zfs_recover via vfs.zfs.recover from /boot/loader.conf. 2007-04-10 12:54:19 +00:00
Pawel Jakub Dawidek
5b9528e2d4 MFp4: Hide under '#ifdef _KERNEL' only what's really needed. 2007-04-10 12:52:14 +00:00
Giorgos Keramidas
a52da38f26 Minor typo fix, noticed while I was going through *_pager.c files. 2007-04-10 12:34:51 +00:00
Konstantin Belousov
5b959aa44f Fix the NAMEI zone leak when snapshot was successfully created.
Reported and tested by:	Peter Holm
MFC after:		2 weeks
2007-04-10 09:31:42 +00:00
Konstantin Belousov
9724167c2a Recalculate the NEWBLOCK flag for pagedep structure after the softdep
lock is dropped, since pagedep may be already processed and deallocated.

Found and tested by:	kris
MFC after:		2 weeks
2007-04-10 09:30:41 +00:00
Konstantin Belousov
23743f6a11 When LK_NOWAIT is passed as argument to process_worklist_item(), this
does not prevent handle_workitem_remove() from recursing into a blocking
version. Add the dirrem to worklist instead of processing it now if this
is the case.

Reported and tested by:	kris
Submitted by:		tegge
MFC after:		2 weeks
2007-04-10 09:28:17 +00:00
Andrew Thompson
49fd43bdbc Fix an uninitialized variable warning. 2007-04-10 08:02:33 +00:00
Andrew Thompson
40c97c2118 Fix build, trunk is a device not an option. 2007-04-10 03:09:38 +00:00
Pawel Jakub Dawidek
2d03e33170 Try to stabilize ZFS with regard to memory consumption:
- Allow to shrink ARC down to 16MB (instead of 64MB).
- Set arc_max to 1/2 of kmem_map by default.
- Start freeing things earlier when low memory situation is detected.
- Serialize execution of arc_lowmem().

I decided to setup minimum ZFS memory requirements to 512MB of RAM and 256MB of
kmem_map size. If there is less RAM or kmem_map, a warning will be printed.
World is cruel, be no better. In other words: modern file system requires
modern hardware:)

From ZFS administration guide:

"Currently the minimum amount of memory recommended to install a Solaris
 system is 512 Mbytes. However, for good ZFS performance, at least one
 Gbyte or more of memory is recommended."
2007-04-10 02:35:57 +00:00
Pawel Jakub Dawidek
52124c7f1c Reduce diff against vendor - we have now stronger check for "mutex already
initialized", so we can go back to kmem_alloc().
2007-04-10 02:19:12 +00:00
Andrew Thompson
75efd6fd67 Add trunk(4) module. 2007-04-10 00:41:31 +00:00