Commit Graph

149265 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
8844a10730 MFC r196395:
Our libc doesn't implement control method for XDR (only kernel does) and it
will always return failure. Fix this by bringing userland implementation of
xdrmem_control() back. This allow 'zpool import' to work again.

Reported by:	Thomas Backman <serenity@exscape.org>
Reviewed by:	kmacy
Approved by:	re (kib)
2009-08-20 00:08:58 +00:00
Simon L. B. Nielsen
452e49d601 MFC 196392:
Add support for backing up the old kernel when installing a new kernel
  using freebsd-update.  This applies to using freebsd-update in "upgrade
  mode" and normal freebsd-update on a security branch.

  The backup kernel will be written to /boot/kernel.old, if the directory
  does not exist, or the directory was created by freebsd-update in a
  previous backup.  Otherwise freebsd-update will generate a new directory
  name for use by the backup.  By default symbol files are not backed up
  to save diskspace and avoid filling up the root partition.

  This feature is fully configurable in the freebsd-update config file,
  but defaults to enabled.

  Reviewed by:	cperciva

Approved by:	re (kib)
2009-08-19 21:01:32 +00:00
Ed Schouten
f0c46a48f7 MFC r196390:
Make the MacBookPro3,1 hardware boot again.

  Tested by:    Patrick Lamaiziere <patfbsd davenulle org>
  Approved by:  re (kib)
2009-08-19 20:44:22 +00:00
Kip Macy
786f829ddb This change fixes a comment and addresses a complaint by kib@ by
moving a frequently executed flowtable syslog statement from being
 conditional on bootverbose to conditional on a per-vnet flowtable
 sysctl.

Approved by:	re@
2009-08-19 20:17:36 +00:00
Xin LI
67a435347b MFC r196386:
Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
Without this changeset there will be no way to prevent these NICs from
sending ARP, which is harmful in server farms that is configured as
"Direct Server Return" behind a load balancer.

A better fix would remove the whole hack completely but it would be
later than 8.0-RELEASE.

Reviewed by:	jfv, yongari
Approved by:	re (kib)
2009-08-19 18:08:50 +00:00
John Baldwin
46208d409c MFC 196382:
Explicitly line up the CPU state labels with the calculated starting column
that takes into account the width of the largest CPU ID.  On systems with
> 10 CPUs the labels for the first 10 CPUs were not lined up properly
otherwise.

Approved by:	re (kib)
2009-08-19 17:45:58 +00:00
Marcel Moolenaar
9fdef7744d MFC change 196383:
Remove the dependency on the kernel -- in particular the gctl request to
 the GEOM_BSD class -- to translate the absolute offsets in the label to
 relative ones. This makes bslabel(8) work correctly with GEOM_PART and
 also when the BSD label is nested under arbitrary partitioning schemes.

Inspired by:	Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by:	re (kib)
2009-08-19 16:40:45 +00:00
Rafal Jaworowski
49d96dc6dd MFC r196380
Fix USB cache sync operations for platforms with non-coherent DMA.

- usb_pc_cpu_invalidate() is called between [consecutive] reads from a device,
  so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we
  cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as
  the low level bus dma sync operation is implementation dependent and we
  cannot assume the required order of operations to be guaranteed.

- usb_pc_cpu_flush() is called before writing to a device, so
  BUS_DMASYNC_PREWRITE should be used.

Submitted by:	Grzegorz Bernacki
Reviewed by:	HPS, arm@, usb@ ML
Tested by:	HPS, Mike Tancsa
Approved by:	re (kib)
Obtained from:	Semihalf
2009-08-19 14:48:59 +00:00
Ed Schouten
e047c5fbb6 MFC r196378:
Small changes to the warning message generated by pty(4):

  - Only print the warning once, instead of filling up the screen.
  - Use the word "legacy" for the pty_warningcnt description, to prevent
    confusion.
  - Use log() instead of printf().

  Discussed with: rwatson, jhb
  Approved by:    re (kib)
2009-08-19 14:38:43 +00:00
Michael Tuexen
d51d92a789 Fix a bug in the handling of unreliable messages which
results in stalled associations.

Approved by: re, rrs (mentor)
2009-08-19 12:12:51 +00:00
Edwin Groothuis
a0f9adc732 - Make note of the update of tzdata from 2008h to 2009j
- Make note of the update of tzcode from 2004a to 2009h
  Add an extra alert that people who update via source or via
  freebsd-update will have to run the tzsetup(8) utility.

Approved by:	re (Kostik)
2009-08-19 03:58:12 +00:00
Max Laier
0e7983d1f6 MFC r196372:
If we cannot immediately get the pf_consistency_lock in the purge thread,
  restart the scan after acquiring the lock the hard way.  Otherwise we
  might end up with a dead reference.

Approved by:	re (kib)
2009-08-19 00:17:00 +00:00
Stanislav Sedov
1daebacca0 - MFC r196370.
Do not try to reevaluate current RX production index on each
  loop iteration as it can be updated by the card while we
  process the RX ring forcing us to process RX descriptors
  for which DMA synchronisation operation has not been
  performed.  This fixes the bug when bge(4) drops packets
  under high load.

Discussed with:	yongari, marius
Approved by:	re (kib)
2009-08-18 21:13:00 +00:00
Kip Macy
670151d0e4 MFC 196368
- change the interface to flowtable_lookup so that we don't rely on
    the mbuf for obtaining the fib index
  - check that a cached flow corresponds to the same fib index as the
    packet for which we are doing the lookup
  - at interface detach time flush any flows referencing stale rtentrys
    associated with the interface that is going away (fixes reported
    panics)
  - reduce the time between cleans in case the cleaner is running at
    the time the eventhandler is called and the wakeup is missed less
    time will elapse before the eventhandler returns
  - separate per-vnet initialization from global initialization
    (pointed out by jeli@)

Reviewed by:	sam@
Approved by:	re@
2009-08-18 20:39:35 +00:00
Pyun YongHyeon
f8fb3cc00e MFC r196366:
Backout r193289. r193289 restored page select bits to previous
  value instead of blindly resetting it to 0. However, it seems page
  select bits of some 88E1116 PHY is initialized to invalid one such
  that restoring page select bits after programming broke MII
  register access. The correct solution would be reset page select
  bits to 0 in PHY attach stage but it would require more testing.
  Since we're in BETA stage such a change would be dangerous so just
  back it out.
  This change should fix nfe(4) breakage on NVIDIA MCP55.

  Reported by:	Ryan Rogers < webmaster <> doghouserepair dot com >
		Sam Fourman Jr. < sfourman <> gmail dot com >
  Tested by:	Ryan Rogers < webmaster <> doghouserepair dot com >
		Sam Fourman Jr. < sfourman <> gmail dot com >
  Approved by:	re (kib)
2009-08-18 20:25:02 +00:00
Michael Tuexen
3da1fd00cf Fix a panic when using one-to-one style sockets in non-blocking
mode and there is no listening server.
PR: 137795
Approved by: re, rrs (mentor)
2009-08-18 20:06:00 +00:00
Pawel Jakub Dawidek
65536ad653 MFC r196358:
Remove unused taskqueue_find() function.

Reviewed by:	dfr
Approved by:	re (kib)
2009-08-18 14:00:25 +00:00
Tom Rhodes
856d08a08d MFC rev 196356:
Document MAKE_DVD and xref svn in ports.

  Approved by:	re@ (kib)
2009-08-18 13:51:51 +00:00
Alexander Motin
382c5c0df4 Fix copy/paste bug, that requests data read during ATA device probe sequence
for ATA_SETFEATURES/ATA_SF_SETXFER command which by definition transfers no
data. Most of controllers are irrelevant to this bug, but some nVidia's
doesn't.

Tested on:      current@
Approved by:    re (kib)
2009-08-18 09:36:25 +00:00
Alexander Motin
a7f9e24d61 MFC r196352:
Fix iSCSI initiator and vpo driver operation, broken by CAM changes.

Reviewed by:	scottl, Danny Braniss
Approved by:	re (rwatson)
2009-08-18 09:31:00 +00:00
Kip Macy
bf4e402b83 fix netboot issue by disabling flowtable lookups until initialization has been run
+ mergeinfo garbage

Reviewed by:	rwatson@
Approved by:	re@
2009-08-17 20:06:00 +00:00
Rick Macklem
8d3f6febcd MFC r196332:
Apply the same patch as r196205 for nfs_upgrade_lock() and
nfs_downgrade_lock() to the experimental nfs client.

Approved by:	re (kensmith), kib (mentor)
2009-08-17 18:11:50 +00:00
John Baldwin
84dbe0452d MFC 196337: Document the newly added SVNCMDARGS, SVNROOT, and SVNBRANCH
variables.

Approved by:	re (kib)
2009-08-17 17:13:17 +00:00
Attilio Rao
7e2d0af9e0 MFC r196334:
* Change the scope of the ASSERT_ATOMIC_LOAD() from a generic check to
  a pointer-fetching specific operation check. Consequently, rename the
  operation ASSERT_ATOMIC_LOAD_PTR().
* Fix the implementation of ASSERT_ATOMIC_LOAD_PTR() by checking
  directly alignment on the word boundry, for all the given specific
  architectures. That's a bit too strict for some common case, but it
  assures safety.
* Add a comment explaining the scope of the macro
* Add a new stub in the lockmgr specific implementation

Tested by: marcel (initial version), marius
Reviewed by: rwatson, jhb (comment specific review)
Approved by: re (kib)
2009-08-17 16:33:53 +00:00
Marcel Moolenaar
87b51e539d MFC rev 196333:
The start of the EFI GPT partition in the PMBR can always be represented
by CHS addressing. Don't define these fields as 0xff, but rather define
them correctly. This prevents boot problems on PCs where GPT is being
used.

PR:             115406
Submitted by:   Kent Hauser <kent@khauser.net>
Approved by:    re (kib)
2009-08-17 16:24:50 +00:00
John Baldwin
e9d0cb1406 Remove the spx_usrreq.c mergeinfo from spx_reass.c. Future changes to
spx_usrreq.c won't be merged to spx_reass.c which is what this would help
with.

Approved by:	re (mergeinfo blanket), rwatson
2009-08-17 15:51:31 +00:00
John Hay
c49b5baa65 MFC: 196326
Fix parse() so that the partition to boot (load /boot/loader) from can
be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader

Reviewed by:	jhb
Approved by:	re (kib)
2009-08-17 15:39:47 +00:00
John Baldwin
08c347079c MFC: Purge mergeinfo in sys/ that is either empty or a subset of the parent
mergeinfo on sys/ itself.

Approved by:	re (mergeinfo blanket)
2009-08-17 14:42:41 +00:00
Scott Long
ae93ebed73 Merge files missed in r196285. SVN is simply horrible. Sorry for the
tree breakage.

Approved by:	re
2009-08-17 13:51:19 +00:00
John Baldwin
4c59d2b0b5 Stow my time machine and note that r196223 is an MFC of r196224.
Pointy hat to:	jhb
Approved by:	re (rwatson)
2009-08-17 13:51:03 +00:00
Konstantin Belousov
1d4dc8543f MFC r196318:
Correct accounting error when allocating a a page table page to implement
a user-space demotion.

Approved by:	re (rwatson)
2009-08-17 13:32:56 +00:00
Rui Paulo
f2d3e43377 MFC r196316:
Fix a typo in ifdef mesh support. This would make mesh unworkable if
  TDMA support was compiled out.

Approved by:	re (kib)
2009-08-17 13:00:32 +00:00
Pawel Jakub Dawidek
22f00f220a MFC r196311:
Correct typo in the previous commit.

Noticed by:	pluknet <pluknet@gmail.com>
Approved by:	re (kib, implicit)
2009-08-17 10:21:37 +00:00
Pawel Jakub Dawidek
1aefcd39f0 MFC r196309:
getcwd() (when __getcwd() fails) works by stating current directory, going up
(..), calling readdir and looking for previous directory inode.  In case of
.zfs/ directory this doesn't work, because .zfs/ is hidden by default, so it
won't be visible in readdir output.

Fix this by implementing VPTOCNP for snapshot directories, so __getcwd()
doesn't fail and getcwd() doesn't have to use readdir method.

This fixes /bin/pwd from within .zfs/snapshot/<name>/.

Suggested by:	kib
Approved by:	re (rwatson)
2009-08-17 10:02:31 +00:00
Pawel Jakub Dawidek
5adfc444cf MFC r196307:
Manage asynchronous vnode release just like Solaris.

Discussed with:	kmacy
Approved by:	re (kib)
2009-08-17 09:55:58 +00:00
Pawel Jakub Dawidek
860386c1a4 MFC r196305:
Fix receive when dataset has no / in its name.

Submitted by:	James R. Van Artsdalen <james-freebsd-current@jrv.org>
Approved by:	re (kib)
2009-08-17 09:42:34 +00:00
Pawel Jakub Dawidek
be7e2e42e1 MFC r196303:
- Reduce z_teardown_lock lock scope a bit.
- The error variable is int, not bool.
- Convert spaces to tabs where needed.

Approved by:	re (kib)
2009-08-17 09:30:31 +00:00
Pawel Jakub Dawidek
a64b735739 MFC r196301:
If z_buf is NULL, we should free znode immediately.

Noticed by:	avg
Approved by:	re (kib)
2009-08-17 09:27:10 +00:00
Pawel Jakub Dawidek
93be9449e4 MFC r196299:
- We need to recycle vnode instead of freeing znode.

Submitted by:	avg

- Add missing vnode interlock unlock.
- Remove redundant znode locking.

Approved by:	re (kib)
2009-08-17 09:23:27 +00:00
Pawel Jakub Dawidek
f0fb1d62c7 MFC r196297:
Fix panic in zfs recv code. The last vnode (mountpoint's vnode) can have
0 usecount.

Reported by:	Thomas Backman <serenity@exscape.org>
Approved by:	re (kib)
2009-08-17 09:14:58 +00:00
Pawel Jakub Dawidek
e43f173602 MFC r196295:
Remove OpenSolaris taskq port (it performs very poorly in our kernel) and
replace it with wrappers around our taskqueue(9).
To make it possible implement taskqueue_member() function which returns 1
if the given thread was created by the given taskqueue.

Approved by:	re (kib)
2009-08-17 09:03:47 +00:00
Pawel Jakub Dawidek
ea5f504fed MFC r196293:
Because taskqueue_run() can drop tq_mutex, we need to check if the
TQ_FLAGS_ACTIVE flag wasn't removed in the meantime, which means we missed a
wakeup.

Approved by:	re (kib)
2009-08-17 08:46:47 +00:00
Pawel Jakub Dawidek
4aae820003 MFC r196291:
- Fix a race where /dev/zfs control device is created before ZFS is fully
  initialized. Also destroy /dev/zfs before doing other deinitializations.
- Initialization through taskq is no longer needed and there is a race
  where one of the zpool/zfs command loads zfs.ko and tries to do some work
  immediately, but /dev/zfs is not there yet.

Reported by:	pav
Approved by:	re (kib)
2009-08-17 08:38:41 +00:00
Pawel Jakub Dawidek
9e813d55e3 MFC r196289:
Remove files that are no longer used.

Discussed with:	kmacy
Approved by:	re (kib)
2009-08-17 08:09:46 +00:00
Pawel Jakub Dawidek
424c75bfe1 MFC r196287:
Be more precise how to get fsids - 'mount -v' doesn't show fsids unless is run
by root.

Approved by:	re (kib)
2009-08-17 07:46:55 +00:00
Scott Long
53e7499383 Merge mptutil
Approved by:	re
2009-08-17 07:30:08 +00:00
Scott Long
42eeb00e0b Merge mfiutil
Approved by:	re
2009-08-17 07:25:12 +00:00
Scott Long
91fa948790 Merge r196200. Add firmware definitions needed by mfiutil
Approved by:	re
2009-08-17 06:21:22 +00:00
Marcel Moolenaar
75f5a2286d MFC change 196278:
Emit a proper error message instead of dumping core when 1)
 GEOM_PART does not exist in the kernel, and 2) the GEOM in
 question does not exist.
 Additionally abort in case of programming errors that result
 in neither the class nor geom not being present in the gctl
 request.

Approved by:	re (kib)
2009-08-16 21:32:12 +00:00
Ed Schouten
336b627671 MFC r196276:
Fix small style regression introduced by the MPSAFE newbus code.

Approved by:	re (rwatson)
2009-08-16 20:33:16 +00:00