dragonfly.git
10 years agotcsh: Update from version 6.17.00 to 6.18.01
John Marino [Fri, 10 May 2013 22:19:15 +0000 (00:19 +0200)]
tcsh: Update from version 6.17.00 to 6.18.01

There were 8 releases since the last tcsh update.
The changes of each are listed below.

When the output of "csh --version" is compared to the previous version,
two differences are noticed.  The first is dpsm is not showing.  This is
correct because it cannot be set simultaneously with widestar as it was.
The second difference is the system malloc is no longer used.  The
sources inside say system malloc can be significantly slower and that
memory statistics will not be available if used.  It also went to pains
to remove the option even if hard-coded in config_p.h.

The identifier for --version was fixed for x86_64 platform by
updating host.defs file.

V6.18.01 - 20120214
  5. fix interruptible wait again
  4. ignore bogus compiler overflow message
  3. cleanup ifdefs in utmp code, and provide default array entries
  2. Ignore #machine entries in host.defs
  1. Detect missing ) in gethost.c (Corinna Vinschen)

V6.18.00 - 20120114
103. remove unused variables.
102. Make gethost use definitions for x __x__ and __x automatically.
101. More utmp fixes
100. V6.17.10 - 20120105
 99. Add more FreeBSD/NetBSD machines
 98. Add portability wrapper for gencat
 97. Fix warning for write in SYSMALLOC systems.
 96. V6.17.09 - 20120102
 95. revert gencat handling to pre-cygwin fixes (without env settings)
 94. remove stray endutent()
 93. V6.17.08 - 20111230
 92. Remove - from gencat
 91. Provide support for malloc_usable_size() so that linux works again
     without SYSMALLOC
 90. Add support for FreeBSD's utmpx.

V6.17.07 - 20111227
 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
     there are more than 10 jobs.
 87. PR/155: Default $anyerror to set for backward compatibility
 86. PR/149: Don't print -1 in %j (Vojtech Vitek)
 85. handle -- on chdir commands as the end of options processing so that
     they can process a directory like -x without resorting to ./-x
     (Andrew Stevenson)
 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (R. Byrnes)
 83. PR/38: Null check for jobs (Kurt Miller)
 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger)
 81. PR/120: string0 in filetest does not have enough space.
 80. V6.17.06 - 20110415
 79. PR/110: Add $anyerror to select behavior. Default to the new one.
 78. Don't try to spell commands that are correct (Rouben Rostamian)
     [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo;
      chmod +x foo; set correct=cmd; ./foo -> ../foo]
 77. Don't push syntax struct on the cleanup stack, because on foo;bar
     if foo fails, we will free bar prematurely (Ben Miller)
 76. Avoid infinite loop while trying to print pid of a dying process
     to a closed file (Bob Arendt)
 75. Handle completion of ${ variables (Anthony Mallet)
 74. Add --disable-nls-catalogs (Corinna Vinschen)
 73. convert message catalogs to UTF-8 (Werner Fink)
 72. check that the NLS path works before setting $NLSPATH.
 71. use SYSMALLOC for GLIBC (Werner Fink)
 70. use mallinfo for SYSMALLOC (Corinna Vinschen)

V6.17.05 - 20110201
 68. Use mkstemp() if there for here docs (Werner Fink)
 67. Fix handling of errors and exit values in builtins (Werner Fink)
 66. Better pty name detection (Werner Fink)
 65. Enable NLS catalogs on Cygwin (Corinna Vinschen)
 64. NLSPATH handling fixes (Corinna Vinschen)
 63. Avoid infrequent exit when tcsh cd's into a non-existent directory
     https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink)
 62. Don't try to spell check full path binaries that are correct because
     they can cause hangs when other nfs partitions are hung. (W. Fink)
 61. Avoid nested interrupts when exiting causing history writing to fail
     https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink)
 60. Instead of giving an error or ignoring lines with missing eol at eof,
     process them.
 59. Avoid leaking fd's in mail check (Werner Fink)
 58. Add cygwin_xcrypt() (Corinna Vinschen)
 57. Recognize i686 (Corinna Vinschen)
 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin
     settings (Corinna Vinschen)
 55. Avoid double slashes in cdpath (Corinna Vinschen)

V6.17.04 - 20110118
 53. Revert PR/110, breaks the test suite.

V6.17.03 - 20110117
 51. PR/102: Complain on input files with missing trailing \n
 50. PR/104: If atime == mtime we don't have new mail.
 49. PR/113: Don't allow illegal variable names to be set.
 48. PR/112: don't set $REMOTEHOST on the local machine.
 47. PR/110: exit status of the pipeline should be status of last command.
 46. Android support (Corinna Vinschen)
 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that
     translates unshifted 7 bit ASCII (Werner Fink)
 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL
     (Jean-Luc Leger)
 43. PR/109: make wait interruptible (Vojtech Vitek)
 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues
     (Robert Byrnes)
 41. remove .bat and .cmd handling for executables on cygwin (C. Vinschen)
 40. Don't echo history while history -L or history -M
 39. Check for EOS before ** from Greg Dionne
 38. Don't fork in backeval from Bryan Mason
 37. Better globstar support from Greg Dionne
 36. Error out when processing the last incomplete line instead of
     silently ignoring it (Anders Kaseorg)
 35. Fix SEGV from echo ``
 34. Better fixes for histchars and promptchars (nargs)
 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context.
     (Fabio Fabbri)

V6.17.02 - 20100512
 31. PR/79: nargs: Better handling for promptchars.
 30. PR/97: Add parseoctal to retain compatibility with previous versions
     (Jim Zajkowski)
 29. PR/84: Performance fixes for large history merges (add
     hashtable (Ted Anderson)
 28. Revert previous #23; people should use $histlit if they want this
     feature.
 27. Don't kill "hup" background jobs when a child of the shell exits.
     From Debian.
 26. Ignore \r\n in the command line options for OS's that don't strip
     these from #!; from Debian
 25. Fix enhanced missing patch (Greg Dionne)
 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now.
     (Corinna Vinschen)
 23. Turn HistLit on while recording history to avoid \!\! losing its \.
     From Debian
 22. set autoexpand; set histchars="";\n<tab> crash. From Debian

V6.17.01 - 20100506
 20. unset verbose while we are reading the history file to avoid echoing
     to the terminal. (Jeffrey Bastian)
 19. globstar addition, Enhance addition, euid, euser, gid variables
     (Greg Dionne)
 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks)
 17. Handle UTF-16 surrogates (Corinna Vinschen)
 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (C. Vinschen)
 15. Better support for Solaris >= 2.9 (Thomas Uhle)
 14. Change internal expression calculations to long long so that we can
     deal with > 32 bit time, inodes, uids, file sizes etc.
 13. Add new linux resource limits.
 12. Don't print 'Exit X' when printexitvalue is set in `` expressions
     (Jeff Bastian)
 11. Add more LS_COLORS vars (M.H. Anderson)
 10. Reduce whitespace in Makefile (Don Estabrook)
  9. Manual page fixes (Alan R. S. Bueno)
  8. Remove history in loops bug from the documentation (Holger Weiss)
  7. Add autorehash (Holger Weiss)
  6. Add history.at (Ted Anderson)
  5. Better NLSPATH handling (Norm Jacobs)
  4. Fix hostname building from utmp (Cyrus Rahman)
  3. Handle pending signals before flush so that the the history file
     does not get truncated.  (Ted Anderson)
  2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil)
  1. remember to closedir in mailchk (from Werner Fink, reported by
     David Binderman)

10 years agotcsh: Add more local modifications
John Marino [Fri, 10 May 2013 23:19:36 +0000 (01:19 +0200)]
tcsh: Add more local modifications

- Remove whitespace from existing local modifications of tcsh.
- Remove two unused variables which break the build with -Werror.
- Disable format warning completely because every xprintf with %S
  parameter breaks the build (it wants the argument to be cast to
  wchar_t* rather than the provided Char*).

10 years agoMerge branch 'vendor/TCSH'
John Marino [Sat, 11 May 2013 01:29:13 +0000 (03:29 +0200)]
Merge branch 'vendor/TCSH'

Conflicts:
contrib/tcsh-6/sh.decls.h

10 years agoUpdate tcsh from 6.17.00 to 6.18.01 on the vendor branch
John Marino [Fri, 10 May 2013 21:13:06 +0000 (23:13 +0200)]
Update tcsh from 6.17.00 to 6.18.01 on the vendor branch

10 years agoAdd option 'dmesg -c' which clears the kernel buffer after it is printed.
Eitan Adler [Fri, 10 May 2013 18:24:39 +0000 (14:24 -0400)]
Add option 'dmesg -c' which clears the kernel buffer after it is printed.

Tested by: swildner

10 years agohammer2 - flush sequencing part 6 - stabilization pass
Matthew Dillon [Fri, 10 May 2013 09:54:16 +0000 (02:54 -0700)]
hammer2 - flush sequencing part 6 - stabilization pass

* Fix bug when chains are e.g. delete/duplicated where a flush can occur
  out of order and retire more recent chain structures leaving older
  CHAIN_DELETED structures behind.  This caused the merged chain_find
  and lookup/iteration code to improperly believe a slot was empty when
  in fact the parent's bref array had a valid blockref.

  Fixed by flagging the discrete chain->next_parent linkages with
  CHAIN_IPACTIVE and adding a ref to the chain, which prevents them
  from being retired out of order.  This is currently being done
  unconditionally (and probably has to be done unconditionally).

* Fix bug related to the clearing of SUBMODIFIED during a flush.  Generally
  speaking a flush pass clears SUBMODIFIED if no children were deferred.

  The bug is that higher-level indirect-block chains closer to the root
  are typically only modified during the flush as the deeper chains are
  flushed recursively and rolled up into the parents on the way back up.
  Because of this, these higher-level chains could represent more than one
  flush synchronization point.  When this situation is detected we now
  set SUBMODIFIED here too.

* Consolidate ip->chain adjustments into the hammer2_inode_repoint()
  procedure.  Remove hammer2_inode_put().

* Cleanup some #if 0'd code that I won't be using.

10 years agoUpdate dutch calendar
Eitan Adler [Thu, 9 May 2013 04:40:23 +0000 (00:40 -0400)]
Update dutch calendar

On 30 April 2013 queen Beatrix resigned and crownprince Willem Alexander
became the new king. King's day is on 27 April.

Obtained From: FreeBSD (r250198)

10 years agoAdd "SECURITY CONSIDERATIONS" to the mdoc template
Eitan Adler [Tue, 7 May 2013 01:07:31 +0000 (21:07 -0400)]
Add "SECURITY CONSIDERATIONS" to the mdoc template

Obtained from: FreeBSD

10 years agobnx: Use different RX coalesce BDs for polling and interrupt mode
Sepherosa Ziehau [Fri, 10 May 2013 07:08:52 +0000 (15:08 +0800)]
bnx: Use different RX coalesce BDs for polling and interrupt mode

The value set by this commit for polling mode improves tiny packets
forwarding performance by +250Kpps in normal mode and +120Kpps in
fast mode.

10 years agohammer2 - flush sequencing part 5 - more flush synchronization work
Matthew Dillon [Fri, 10 May 2013 04:03:01 +0000 (21:03 -0700)]
hammer2 - flush sequencing part 5 - more flush synchronization work

* Get rid of chain->parent, replacing it with chain->above which is a
  pointer to the core common to the possibly multiple parents.  Due
  to the multi-parenting, chain->parent was rather ad-hoc so getting
  rid of makes the code more clear.

* Adjust several APIs which used to take a locked parent of chain to
  instead take the core common to multiple parents of chain.

* Rework how CHAIN_MOVED is cleared.  The code works better but still
  has bugs which can leave chains hanging and unflushed on umount.

* Rework the lastdrop function significantly.

* Continue working on automatic delete/duplicate operation when a
  modification crosses a synchronization boundary.  This code is now
  mostly implemented.

* Continue working on the flush filter which is responsible for
  differentiating modifications made before and after the synchronization
  point.  The filter is now mostly implemented.

* Use spinlock protection on the rbtree, allowing manipulation of children
  without having to lock a specific parent chain (which wouldn't help much
  anyway since there can be more than one parent).

* Fix numerous assertions and panics.

10 years agobnx: In polling mode, force chip update status block for status changes
Sepherosa Ziehau [Thu, 9 May 2013 13:59:11 +0000 (21:59 +0800)]
bnx: In polling mode, force chip update status block for status changes

If the status block updating is not forced, we will always see staled
status changes in polling mode, which causes bunch of unnecessary register
reading.

For status changes sharing status block with transmission, staled status
changes probably won't linger for too much time, since any data transmit
completion will cause status block to be updated.  However, for status
changes using its own status block, staled status changes will be there
until the chips are stopped.

10 years agobnx: Optimize RX STD ring refilling scheduling
Sepherosa Ziehau [Wed, 8 May 2013 01:42:58 +0000 (09:42 +0800)]
bnx: Optimize RX STD ring refilling scheduling

At the end of the RX RET ring interrupt, the RX STD ring refilling is
scheduled only when the number of consumed RX BDs are more then half of
the RX STD ring size (256).

This reduces the IPI rate on CPU that performs the RX STD ring refilling
from ~17000ipis/s to ~4000ipis/s on the system with heavy network loading.

10 years agoBring usb-hid-messages up to date
Eitan Adler [Tue, 7 May 2013 01:04:59 +0000 (21:04 -0400)]
Bring usb-hid-messages up to date

Obtained from: FreeBSD

10 years agodevd: Simplify handling of romeo_must_die
Eitan Adler [Mon, 6 May 2013 21:29:48 +0000 (17:29 -0400)]
devd: Simplify handling of romeo_must_die

Obtained from: FreeBSD

10 years agodevd: Don't call string() explicitly
Eitan Adler [Mon, 6 May 2013 21:29:03 +0000 (17:29 -0400)]
devd: Don't call string() explicitly

Obtained from: FreeBSD

10 years agodevd: Reduce diff with FreeBSD
Eitan Adler [Mon, 6 May 2013 21:29:36 +0000 (17:29 -0400)]
devd: Reduce diff with FreeBSD

* Update Warner's copyright

* Log to standard error instead of stdout.

* Add 'const' where possible

* Use pre increment rather than post increment for non-primative types.

10 years agoif: Update comment concerning subqueue; no functional changes
Sepherosa Ziehau [Thu, 9 May 2013 03:24:03 +0000 (11:24 +0800)]
if: Update comment concerning subqueue; no functional changes

10 years agoethernet: Update comment; no functional changes
Sepherosa Ziehau [Thu, 9 May 2013 03:03:26 +0000 (11:03 +0800)]
ethernet: Update comment; no functional changes

10 years agotso: Remove the pendantic tso_pullup functions
Sepherosa Ziehau [Thu, 9 May 2013 02:32:44 +0000 (10:32 +0800)]
tso: Remove the pendantic tso_pullup functions

All of the drivers supporting TSO use the header lengthes stored in mbuf
pkthdr (csum_*hlen) to accelerate the transmit descriptors setup.

10 years agoifq: Update comment; no functional changes
Sepherosa Ziehau [Thu, 9 May 2013 02:26:54 +0000 (10:26 +0800)]
ifq: Update comment; no functional changes

10 years agoip_output: Always panic if the rtentry is not owned by the current cpu
Sepherosa Ziehau [Thu, 9 May 2013 02:07:02 +0000 (10:07 +0800)]
ip_output: Always panic if the rtentry is not owned by the current cpu

It has been on for several releases; make it mandatory now

10 years agobusdma: Update manpage about BUS_SPACE_UNRESTRICTED
Sepherosa Ziehau [Thu, 9 May 2013 01:54:37 +0000 (09:54 +0800)]
busdma: Update manpage about BUS_SPACE_UNRESTRICTED

Reported-by: ftigeot@
10 years agoifnet: Update and add comment; no functional changes
Sepherosa Ziehau [Thu, 9 May 2013 01:21:38 +0000 (09:21 +0800)]
ifnet: Update and add comment; no functional changes

- Update various comment
- Remove no longer applied comment
- Add comment for ifaddr per-cpu container
- Add comment for per-cpu ifnet and ifaddr statistics
- Add comment for ifnet single serializer mode and multiple serializers
  mode
- Add pseudo code in comment for ifnet multiple transmit queue support

10 years agoawk: Update to version 20121220
John Marino [Wed, 8 May 2013 23:53:12 +0000 (01:53 +0200)]
awk: Update to version 20121220

* BK added  __attribute__((__noreturn__)) to a couple of lines in
  proto.h, to silence an enthusiastic checker.
* NK fixed obscure call by value bug in split(a[1],a) reported on
  9fans.  the management of temporary values is just a mess; he
  took a shortcut by making an extra string copy.
* tiny fiddle in setfval to eliminate -0 results in T.expr, which
  has irritated BK for 20+ years.

The README.DELETED file was relocated from the vendor branch to
the master branch to be consistent with how most of the vendor
branches are handled.

10 years agoMerge branch 'vendor/AWK'
John Marino [Thu, 9 May 2013 00:47:07 +0000 (02:47 +0200)]
Merge branch 'vendor/AWK'

10 years agoUpdate awk from 20110810 to 20121220 on vendor branch gitea/vendor/AWK origin/vendor/AWK
John Marino [Wed, 8 May 2013 23:40:12 +0000 (01:40 +0200)]
Update awk from 20110810 to 20121220 on vendor branch

10 years agohammer2 - flush sequencing part 4 - stabilization and cleanup, flush sep
Matthew Dillon [Thu, 9 May 2013 00:24:23 +0000 (17:24 -0700)]
hammer2 - flush sequencing part 4 - stabilization and cleanup, flush sep

* Fix bugs in the handling of DIRECTDATA.  The data for small
  files <= 512 bytes is stored in the inode itself using the
  area that would otherwise contain the indirect block table.

  Cleanup the flag handling for this data, ensure synchronous bwrite()s
  for this data area (the strategy code for direct-data reads and writes
  doesn't actually do any I/O), and ensure proper read-before-write
  operation.

* Adjust hammer2_inode_create() and hammer2_chain_modify_ip() to take/return
  (*chainp).

* Change the inode locking APIs to return the locked chain (unlocking APIs
  take the locked chain as an argument).  This allows the chain to be
  manipulated by the code inbetween, including replacing it with other
  chains, instead of the mess we had before where ip->chain had an implied
  lock associated with it.

  With this change, replacing ip->chain is just a matter of adjusting
  ref counts and not also having to worry about locks.

* Modify the inode chain proactively instead of indirectly.

* Set HAMMER2_INODE_MODIFIED proactively instead of indirectly.  This flag
  is now only used to filter vfs_sync scans.

* Start working on flush transitions.  hammer2_modify_chain() and friends
  will now delete/duplicate an underlying chain that is already in the
  MODIFIED state (returning the new chain) for the case where the previous
  modifications are associated with a flush-in-progress and the current
  modifications are outside of that flush.

* Add hammer2_chain_delete_duplicate(), a function which combines the
  DELETE and duplication operation in one atomic op.  Otherwise a lookup
  or find can catch such operations in the middle and improperly believe
  that the element is fully deleted when it isn't.

* Fix chain refs in a few places.

10 years agokernel - Wakeup p->p_step on procfs close.
Matthew Dillon [Wed, 8 May 2013 23:11:55 +0000 (16:11 -0700)]
kernel - Wakeup p->p_step on procfs close.

* Wakeup p->p_step in addition to p->p_stype on procfs close.

Reported-by: vsrinivas
10 years agozlib: Upgrade from version 1.2.7 to 1.2.8
John Marino [Wed, 8 May 2013 18:52:13 +0000 (20:52 +0200)]
zlib: Upgrade from version 1.2.7 to 1.2.8

There were four releases since the last update.  These bullets were
selectively removed from the Changelog:

Changes in 1.2.7.1 (24 Mar 2013)
- Replace use of unsafe string functions with snprintf if available
- Fix gzgetc undefine when Z_PREFIX set [Turk]
- Fix bug in 'F' mode for gzopen()
- Add inflateGetDictionary() function
- Correct comment in deflate.h
- Delete "--version" file if created by "ar --version" [Richard G.]
- Remove unused variable in infback9.c
- Fix argument checks in gzlog_compress() and gzlog_write()
- Clean up the usage of z_const and respect const usage within zlib
- Avoid shift equal to bits in type (caused endless loop)
- Fix unintialized value bug in gzputc() introduced by const patches
- Fix memory allocation error in examples/zran.c [Nor]
- Fix bug where gzopen(), gzclose() would write an empty file
- Fix bug in gzclose() when gzwrite() runs out of memory
- Add note to contrib/blast to use binary mode in stdio
- Fix comparisons of differently signed integers in contrib/blast
- Check for invalid code length codes in contrib/puff
- Fix serious but very rare decompression bug in inftrees.c
- Update inflateBack() comments, since inflate() can be faster
- Use underscored I/O function names for WINAPI_FAMILY
- Add _tr_flush_bits to the external symbols prefixed by --zprefix
- Fix casting error in contrib/testzlib/testzlib.c
- Fix types in contrib/minizip to match result of get_crc_table()
- Simplify contrib/vstudio/vc10 with 'd' suffix
- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h
- Add gzvprintf() as an undocumented function in zlib
- Remove runtime check in configure for four-byte integer type
- Add casts and consts to ease user conversion to C++
- Do not return Z_BUF_ERROR if deflateParam() has nothing to write

Changes in 1.2.7.2 (13 Apr 2013)
- Change check for a four-byte type back to hexadecimal
- Fix typo in win32/Makefile.msc
- Add casts in gzwrite.c for pointer differences

Changes in 1.2.7.3 (13 Apr 2013)
[Not applicable]

Changes in 1.2.8 (28 Apr 2013)
- Do not force Z_CONST for C++
- Correct spelling error in zlib.h

10 years agoMerge branch 'vendor/ZLIB'
John Marino [Wed, 8 May 2013 19:37:49 +0000 (21:37 +0200)]
Merge branch 'vendor/ZLIB'

10 years agoUpdate zlib from version 1.2.7 to 1.2.8 on vendor branch gitea/vendor/ZLIB origin/vendor/ZLIB
John Marino [Wed, 8 May 2013 18:27:59 +0000 (20:27 +0200)]
Update zlib from version 1.2.7 to 1.2.8 on vendor branch

10 years agokernel/acpi: Sync acpi_pci_link with FreeBSD.
Sascha Wildner [Wed, 8 May 2013 18:26:52 +0000 (20:26 +0200)]
kernel/acpi: Sync acpi_pci_link with FreeBSD.

* Fix use-after-free bug for extended IRQ resource[1].

* Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link
  that uses non-ISA IRQs but use a plain IRQ resource in _CRS.  However,
  a non-ISA IRQ can't fit into a plain IRQ resource.  If we encounter a
  link like this, build the resource buffer from _PRS instead of _CRS.

* Set the correct size of the end tag in a resource buffer.

* Make MALLOC_DEFINEs that have no corresponding MALLOC_DECLAREs static.

Reviewed-and-tested-by: sephe
10 years agogcc47: Update base compiler to from version 4.7.2 to 4.7.3
John Marino [Wed, 8 May 2013 11:09:38 +0000 (13:09 +0200)]
gcc47: Update base compiler to from version 4.7.2 to 4.7.3

This is a bug fix release.
The official change page is http://gcc.gnu.org/gcc-4.7/changes.html
According to it, 119 bugs have been resolved since version 4.7.2 was released
although many of them are surely not applicable for DragonFly.  The fixes
include 3 top priority bug reports and 27 second-priority bug reports.

10 years agoMerge branch 'vendor/GCC47'
John Marino [Wed, 8 May 2013 16:37:36 +0000 (18:37 +0200)]
Merge branch 'vendor/GCC47'

10 years agoUpgrade GCC from 4.7.2 to 4.7.3 on the vendor branch
John Marino [Wed, 8 May 2013 10:35:36 +0000 (12:35 +0200)]
Upgrade GCC from 4.7.2 to 4.7.3 on the vendor branch

10 years agokernel/acpi: Fix a typo in a function name.
Sascha Wildner [Wed, 8 May 2013 15:35:43 +0000 (17:35 +0200)]
kernel/acpi: Fix a typo in a function name.

10 years agosyncache: Make sure the accepcted socket is created in the proper netisr
Sepherosa Ziehau [Wed, 8 May 2013 07:24:04 +0000 (15:24 +0800)]
syncache: Make sure the accepcted socket is created in the proper netisr

While, im here, remove the no longer applied comment; tcp threads are
long gone.

10 years agohammer2 - Add 'snapshot' directive
Matthew Dillon [Wed, 8 May 2013 02:37:48 +0000 (19:37 -0700)]
hammer2 - Add 'snapshot' directive

* Add the snapshot directive, which by default snapshots the current
  directory or the specified directory.

  A label is optional.  If not specified the PFS name prefix and a timecode
  postfix is constructed.  Snapshots are created in the super-root, so use
  pfs-list to list them along with any discrete PFS's.

* Fix the pfs-delete directive.

* Subdirectories of the H2 mount can be snapshotted with the caveat that
  hardlinks which cross above the snapshot directory will not be in the
  snapshot (have lookup failures when accessed via the snapshot).

10 years agohammer2 - flush sequencing part 3 - add snapshots
Matthew Dillon [Wed, 8 May 2013 02:32:04 +0000 (19:32 -0700)]
hammer2 - flush sequencing part 3 - add snapshots

* Basic snapshot creation currently uses a duplicate/create sequence
  to duplicate the directory being snapshotted, with caveats listed in
  the TODO.

  Snapshotting the mount point works as expected though work needs to be
  done on the flushing.  Snapshotting a subdirectory works with some
  issues (hardlinks which span above the parent directory will not be
  snapshotted).

* Add the PFS_SNAPSHOT ioctl for writable snapshot creation.

* Adjust the PFS_GET ioctl to support retrieval of the PFS specific to
  the file descriptor.

* Implement PFS deletion and augment the unlink code to allow non-empty
  snapshots to be deleted.

* Add restricted flushing to support flushing the snapshot concurrent to
  modifying operations occurring during the snapshot flush.  Untested.

10 years agobsd-family-tree: Sync with FreeBSD (adds OpenBSD 5.3 & DragonFly 3.4.1).
Sascha Wildner [Tue, 7 May 2013 18:00:25 +0000 (20:00 +0200)]
bsd-family-tree: Sync with FreeBSD (adds OpenBSD 5.3 & DragonFly 3.4.1).

10 years agodevd: Prefer using the C++ version of the standard headers
Eitan Adler [Mon, 6 May 2013 18:31:53 +0000 (14:31 -0400)]
devd: Prefer using the C++ version of the standard headers

These place the names within the std namespace (and possibly within the
global namespace).

The main advantage is that the C++ versions can provide optimized versions
or simplified interfaces.

Obtained From: FreeBSD (r250186)

10 years agodevd: Use simpler dst += *x instead of str.append(x, 1)
Eitan Adler [Mon, 6 May 2013 18:46:09 +0000 (14:46 -0400)]
devd: Use simpler dst += *x instead of str.append(x, 1)

Also fix typo in comment

Obtained From: FreeBSD

10 years agodevd: Use string::empty() instead of string::length() == 0
Eitan Adler [Mon, 6 May 2013 18:49:18 +0000 (14:49 -0400)]
devd: Use string::empty() instead of string::length() == 0

Obtained From: FreeBSD

10 years agodevd: Use 'const' where possible
Eitan Adler [Mon, 6 May 2013 18:44:58 +0000 (14:44 -0400)]
devd: Use 'const' where possible

10 years agodevd: Use volatile sig_atomic_t...
Eitan Adler [Mon, 6 May 2013 18:44:27 +0000 (14:44 -0400)]
devd: Use volatile sig_atomic_t...

...for the flag set by a signal handler. Remove call to _exit() from signal
handler, which also sets a stop flag.

Obtained From: FreeBSD

10 years agodevd: Prefer the use of initializer lists to ctor assignment
Eitan Adler [Mon, 6 May 2013 18:40:17 +0000 (14:40 -0400)]
devd: Prefer the use of initializer lists to ctor assignment

10 years agodevd: Avoid the creation of a temporary object...
Eitan Adler [Mon, 6 May 2013 18:37:39 +0000 (14:37 -0400)]
devd: Avoid the creation of a temporary object...

...by using the prefix operator for non-primitive types.

Obtained From: FreeBSD (r243931)

10 years agorm(1): Some minor style and bug fixes from FreeBSD
Eitan Adler [Fri, 26 Apr 2013 17:57:15 +0000 (13:57 -0400)]
rm(1): Some minor style and bug fixes from FreeBSD

10 years agobnx: Use different TX coalesce BDs for polling and interrupt mode
Sepherosa Ziehau [Mon, 6 May 2013 03:30:28 +0000 (11:30 +0800)]
bnx: Use different TX coalesce BDs for polling and interrupt mode

10 years agoRemove advertising header from man pages.
Justin C. Sherrill [Mon, 6 May 2013 02:26:03 +0000 (22:26 -0400)]
Remove advertising header from man pages.

By: Eitan Adler <lists@eitanadler.com>

10 years agoRemove advertising clause from all that isn't contrib or userland bin.
Justin C. Sherrill [Mon, 6 May 2013 02:18:44 +0000 (22:18 -0400)]
Remove advertising clause from all that isn't contrib or userland bin.

By: Eitan Adler <lists@eitanadler.com>

10 years agoRemove advertising header from all userland binaries.
Justin C. Sherrill [Mon, 6 May 2013 02:09:38 +0000 (22:09 -0400)]
Remove advertising header from all userland binaries.

From: Eitan Adler <lists@eitanadler.com>

10 years agoahci(4): Maximum I/O size is 2MB
François Tigeot [Sun, 5 May 2013 08:30:44 +0000 (10:30 +0200)]
ahci(4): Maximum I/O size is 2MB

10 years agocpdup - add -n (not-for-real) option
Matthew Dillon [Sun, 5 May 2013 19:37:32 +0000 (12:37 -0700)]
cpdup - add -n (not-for-real) option

* Add cpdup -n, which causes cpdup to go through the motions but not
  actually make any modifications.

10 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 5 May 2013 19:34:47 +0000 (12:34 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

10 years agobnx: Utilize hardware supplied RSS hash
Sepherosa Ziehau [Sun, 5 May 2013 13:56:35 +0000 (21:56 +0800)]
bnx: Utilize hardware supplied RSS hash

The IP fragments detection is done in the same fashion as:
42ad0e07a760aa29981d4650100f65e770f8f144
which may need further investigation.

10 years agokernel/scsi_da: If booting verbosely, si_iosize_max when registering.
Sascha Wildner [Sun, 5 May 2013 10:46:02 +0000 (12:46 +0200)]
kernel/scsi_da: If booting verbosely, si_iosize_max when registering.

10 years agokernel/scsi_da: Use __func__ for printing function names.
Sascha Wildner [Sun, 5 May 2013 10:31:50 +0000 (12:31 +0200)]
kernel/scsi_da: Use __func__ for printing function names.

10 years agosbp(4): Maximum I/O size is 512KB
François Tigeot [Sun, 5 May 2013 06:44:01 +0000 (08:44 +0200)]
sbp(4): Maximum I/O size is 512KB

10 years agoUse C99 __func__ instead of __FUNCTION__.
Sascha Wildner [Sat, 4 May 2013 19:58:43 +0000 (21:58 +0200)]
Use C99 __func__ instead of __FUNCTION__.

10 years agohammer2 - flush sequencing part 2
Matthew Dillon [Sat, 4 May 2013 18:14:20 +0000 (11:14 -0700)]
hammer2 - flush sequencing part 2

* API adjustments.  Add trans to setsubmod and pass &chain to
  hammer2_chain_modify() so it can (soon) modify/duplicate and
  return a different chain.

* Tentitively add flush_tid tracking to the hmp which will
  soon be used by the modify code to determine when a duplication
  is required.

10 years agohammer2 - flush sequencing part 1
Matthew Dillon [Sat, 4 May 2013 04:31:31 +0000 (21:31 -0700)]
hammer2 - flush sequencing part 1

* Rip out the jerry-rigged flush sequencer and start work on a real
  one.

* Sync and fsync calls create synchronization points and will be serialized
  against each other.

* Modifying operations occurring before a synchronization point will stall
  modifying operations occurring after the synchronization point until
  they complete.  This will need to be optimized.

* However, the synchronization points are coded such that modifying operations
  occurring after a synchronization point will be able to run concurrently
  with the disk flush related to that synchronization point.

  So if there is only one synchronization point (sync or fsync or background
  sync) active, modifying operations will generally not stall.  At least not
  for very long.

10 years agohammer2 - Major restructuring, part 6/several
Matthew Dillon [Fri, 3 May 2013 20:17:26 +0000 (13:17 -0700)]
hammer2 - Major restructuring, part 6/several

* Stabilization pass.

* Protect vfs_sync with a master lock to serialize operations, to protect
  the master volume header sequencing.  The related fsync scan will use the
  same transaction id.

* Fix a bug where races could cause SUBMODIFIED set in deep chains to not
  propagate back up to the root.

* Limit debug dumps on unmount.

* API adjustments.

10 years agohammer2 - Major restructuring, part 5/several
Matthew Dillon [Fri, 3 May 2013 17:55:39 +0000 (10:55 -0700)]
hammer2 - Major restructuring, part 5/several

* Stabilization pass.  Force VOP_WRITE operations on inode-embedded data
  to be synchronous, otherwise the asynchronous strategy code can catch
  inode->chain while it is in flux.

10 years agokernel/netgraph: Fix a 64 bit pointer issue.
Sascha Wildner [Fri, 3 May 2013 17:22:11 +0000 (19:22 +0200)]
kernel/netgraph: Fix a 64 bit pointer issue.

Previously, ng_parse_uint32_type was taken on x86_64 too.

Taken-from: FreeBSD

10 years agoUnbreak buildworld.
Sascha Wildner [Fri, 3 May 2013 16:52:18 +0000 (18:52 +0200)]
Unbreak buildworld.

10 years agobnx: Fix up some comment abount ring control blocks (RCBs)
Sepherosa Ziehau [Fri, 3 May 2013 13:21:51 +0000 (21:21 +0800)]
bnx: Fix up some comment abount ring control blocks (RCBs)

10 years agobnx: Implement multiple RX/TX rings and MSI-X support for 5718/57785
Sepherosa Ziehau [Wed, 17 Apr 2013 14:12:29 +0000 (22:12 +0800)]
bnx: Implement multiple RX/TX rings and MSI-X support for 5718/57785

BCM5718 and BCM57785 families support 4 RX rings and 5 MSI-X vectors.
Additionally BCM5719/BCM5720 support 4 TX rings, while other chips in
these two families only support 1 TX ring.  Each MSI-X vector has its
own interrupt moderation parameters.

Hardware supplied RSS hash and packet type are not utilized yet; they
will be supported in the upcoming commits.

This commit also fixes some RX standard ring refilling races introduced
in:
841cdf08263117c54b0a800440c7630b6913c21e

RX standard ring refilling scheduling may enjoy futher optimization.

10 years agohammer2 - Improve 'hammer2 show'
Matthew Dillon [Fri, 3 May 2013 08:36:27 +0000 (01:36 -0700)]
hammer2 - Improve 'hammer2 show'

* The show directive now chooses the best volume header by default
  (but will dump all four if you specify -vvv).

10 years agohammer2 - Major restructuring, part 4/several
Matthew Dillon [Fri, 3 May 2013 08:28:00 +0000 (01:28 -0700)]
hammer2 - Major restructuring, part 4/several

* Add inumber -> inode structure tracking and lookup.  This is needed to
  ensure that only a single inode structure be used to track multiple
  hardlinks to the same place.

* Continue stabilization.  Remove modify_tid/delete_tid checks in the
  flush code and (for now) only flush along the live path.

  Refactor held chains when creating new chains.  The creation of a new
  chain can move around existing chains, causing the held chain to be
  marked deleted.

  When a hardlink is consolidated in a parent directory the source chain
  used in the duplication is not deleted.  Numerous chain->duplink
  handling code was assuming that the source was always deleted.  Fix
  that.

* The shared inode lock now refactors ip->chain (the exclusive inode lock
  already did so).

* Fix most ref-counting of the chain structure, fixing most of the memory
  leakage issues on unmount.

* There are still some issues with small files not inheriting their data
  on duplication.  cpdup /usr/share works but a significant number of
  small files lose their data references on re-mount.

10 years agohammer2 - Major restructuring, part 3/several
Matthew Dillon [Thu, 2 May 2013 20:06:28 +0000 (13:06 -0700)]
hammer2 - Major restructuring, part 3/several

* Use hammer2_chain_duplicate() to move hardlinks to common parents.

* Adjust flush algorithms, particularly when it comes to figuring out
  when we can clear the MOVED bit on a chain.

* chain RBTREE sorts on delete_tid in addition to sorting on the key.
  Add ranged searches.

  The frontend no longer modifies indirect blocks.  Instead, chains in
  the RBTREE are used to placehold both insertions and deletions.

* Stabilization pass.  (still work to do on chain refs / unmount and
  optimizing the flush).

10 years agortadvd(8): Fix a typo in a message.
Sascha Wildner [Thu, 2 May 2013 17:40:23 +0000 (19:40 +0200)]
rtadvd(8): Fix a typo in a message.

10 years agotoeplitz: Return raw hash
Sepherosa Ziehau [Thu, 2 May 2013 09:19:12 +0000 (17:19 +0800)]
toeplitz: Return raw hash

Currently only 16 bits are valid, since the key is seeded with 2 bytes.

10 years agoip_demux: Save raw hash, instead of hash masked w/ ncpus2_mask, i.e. cpuid
Sepherosa Ziehau [Thu, 2 May 2013 08:57:02 +0000 (16:57 +0800)]
ip_demux: Save raw hash, instead of hash masked w/ ncpus2_mask, i.e. cpuid

10 years agoip_demux: Remove unused udp_mpsafe_thread global variable
Sepherosa Ziehau [Thu, 2 May 2013 08:42:23 +0000 (16:42 +0800)]
ip_demux: Remove unused udp_mpsafe_thread global variable

10 years agonetisr: Fix comment
Sepherosa Ziehau [Thu, 2 May 2013 08:23:10 +0000 (16:23 +0800)]
netisr: Fix comment

10 years agonetisr: Renaming, cpufn -> hashfn; no functional changes
Sepherosa Ziehau [Thu, 2 May 2013 08:07:15 +0000 (16:07 +0800)]
netisr: Renaming, cpufn -> hashfn; no functional changes

10 years agonetisr: Add netisr_hashcpu, which maps pkt hash to cpuid
Sepherosa Ziehau [Thu, 2 May 2013 07:21:10 +0000 (15:21 +0800)]
netisr: Add netisr_hashcpu, which maps pkt hash to cpuid

10 years agonetisr: Add netisr_hashport, which finds netisr msgport based on pkt hash
Sepherosa Ziehau [Thu, 2 May 2013 06:59:23 +0000 (14:59 +0800)]
netisr: Add netisr_hashport, which finds netisr msgport based on pkt hash

10 years agonetisr: Inline netisr_cpuport() and netisr_curport()
Sepherosa Ziehau [Thu, 2 May 2013 06:29:30 +0000 (14:29 +0800)]
netisr: Inline netisr_cpuport() and netisr_curport()

These two functions do nothing more than just return pointer to the
element in the array.

Per our header file naming convention, put these two functions in
net/netisr2.h

10 years ago<pthread.h>: Adjust the visibility of pthread_{get,set}stackaddr() protos.
Sascha Wildner [Tue, 30 Apr 2013 22:18:03 +0000 (00:18 +0200)]
<pthread.h>: Adjust the visibility of pthread_{get,set}stackaddr() protos.

The functions were removed from issue 7 of the specification.

http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap01.html

10 years agokernel - Terminate ddb backtraces at Xfast_syscall
Matthew Dillon [Mon, 29 Apr 2013 19:27:34 +0000 (12:27 -0700)]
kernel - Terminate ddb backtraces at Xfast_syscall

* Terminate ddb backtraces at Xfast_syscall to try to avoid double-faults
  from recursing into garbage.

10 years agoMerge <machine/uvparam.h> into <time.h> and remove it.
Sascha Wildner [Mon, 29 Apr 2013 16:23:11 +0000 (18:23 +0200)]
Merge <machine/uvparam.h> into <time.h> and remove it.

Its only purpose was to define separate CLK_TCK and CLOCKS_PER_SEC per
platform, all of which were 128. It also was missing for vkernel64
architecture.

FreeBSD has since merged it into <time.h>, too.

10 years agohammer2 - Major restructuring, part 2/several
Matthew Dillon [Sun, 28 Apr 2013 23:24:56 +0000 (16:24 -0700)]
hammer2 - Major restructuring, part 2/several

* Stabilization pass on hammer2_inode_connect() and
  hammer2_hardlink_consolidate().  Adjust the API to accomodate
  requirements (primarily that the caller is responsible for holding
  the inode locked and for replacing ip->chain).

* Add hammer2_inode_repoint() to handle the guts of replacing ip->chain.

* Flush code shouldn't be messing the chain->bref when deleting the chain
  as the chain may be used in a duplication operation after the call.

* basic rm/mv/ln operations now work (note: we still need to code the
  reparenting of sub-chains based on chain->duplink, and hardlinks are
  still buggy when parent directories get renamed).

10 years agosbp(4): Support MAXPHYS up to 512KB
François Tigeot [Sun, 28 Apr 2013 13:53:56 +0000 (15:53 +0200)]
sbp(4): Support MAXPHYS up to 512KB

- We need at least two OCBs with indirect pointers allocated in a 4KB page.
- SBP_MAXPHYS can increase to 1MB once we separate management OCB/ORB
  which usually does not need indirect pointers.
- We have to increase SBP_DMA_SIZE for MAXPHYS larger than 1MB.

Obtained-from: FreeBSD

10 years agosbp(4): Sync sbp.h with FreeBSD
François Tigeot [Sun, 28 Apr 2013 12:56:24 +0000 (14:56 +0200)]
sbp(4): Sync sbp.h with FreeBSD

* Change u_intXX_t to uintXX_t.

* Change a couple of 'unsigned long's to uint32_t where appropriate.

* Define Logical Unit Reset so it can be used in sbp_targ

Obtained-from: FreeBSD

10 years agousr.sbin/Makefile: Fix typo from the last commit.
Sascha Wildner [Sun, 28 Apr 2013 08:52:47 +0000 (10:52 +0200)]
usr.sbin/Makefile: Fix typo from the last commit.

10 years agoRemove pca and speaker device remains (both deleted).
Sascha Wildner [Sun, 28 Apr 2013 08:27:14 +0000 (10:27 +0200)]
Remove pca and speaker device remains (both deleted).

10 years agonetisr: Function renaming; no functional changes
Sepherosa Ziehau [Sun, 28 Apr 2013 08:12:58 +0000 (16:12 +0800)]
netisr: Function renaming; no functional changes

This cleans up code for keeping input packets' hash instead of masking
the hash with ncpus2_mask.  netisr_hashport(), which maps packet hash
to netisr port, will be added soon.

10 years agoRemove <machine/if_wl_wavelan.h>, which was for the deleted wl(4) driver.
Sascha Wildner [Sun, 28 Apr 2013 08:03:53 +0000 (10:03 +0200)]
Remove <machine/if_wl_wavelan.h>, which was for the deleted wl(4) driver.

10 years agoRemove some header files for drivers that were deleted.
Sascha Wildner [Sun, 28 Apr 2013 07:48:25 +0000 (09:48 +0200)]
Remove some header files for drivers that were deleted.

10 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 28 Apr 2013 07:49:09 +0000 (00:49 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

10 years agohammer2 - Major restructuring, part 1/several
Matthew Dillon [Sun, 28 Apr 2013 05:38:20 +0000 (22:38 -0700)]
hammer2 - Major restructuring, part 1/several

* This breaks a lot of things.  The next few commits will get it all
  working again.

* Significantly rework the data structures.  Instead of embedding the
  RBTREE for a chain's children in the chain, the chain instead points
  to a secondary structure containing the RBTREE.

  Chains can no longer be moved within the in-memory topology.  That is,
  if a file is renamed or a block is resized or a block is moved into or
  out of an indirect block, the in-memory chain representing that block
  is NOT moved.  Instead, the in-memory chain is marked deleted and a
  copy is created at the new location.  Both the old and the new chain
  reference the same secondary structure and thus share the same RBTREE,
  and reference the same media storage.

  In addition, chain->duplink points from the deleted chain to its relocated
  copy and maintains a reference on the target until the deleted chain is
  deallocated.  It is possible for the linked list to span more than one
  element.

  This link will soon be used to retarget inode->chain pointers (which can
  wind up pointing to stale data) and also eventually effect chain->parent
  traversals (real parent becomes chain->parent->[duplink*]).  A rethink
  might be needed down the line.

* This will allow the flush code to run 100% asynchronous from the
  frontend and still be able to flush to a synchronization point no
  matter how complex a set of changes have occured to the filesystem
  concurrent to the flush (but after its synchronization point).

* The change also stabilizes chain->parent, which simplifies quite a bit
  of code.

* Simplify nearly all the hammer2_chain_*() API functions, and other
  functions.

* Add a hammer2_trans (transaction) structure to keep track of modifying
  transactions.  This will be flushed out later and used to detect flush
  synchronization points.  It currently contains the transaction id.

* Start adding API infrastructure and start reworking the flush and other
  tree-modifying code to work under the new abstraction.

10 years agonetisr: Function renaming; no functional changes
Sepherosa Ziehau [Sun, 28 Apr 2013 06:53:57 +0000 (14:53 +0800)]
netisr: Function renaming; no functional changes

10 years agohammer2 - Fix compiler warnings
Matthew Dillon [Sun, 28 Apr 2013 05:36:42 +0000 (22:36 -0700)]
hammer2 - Fix compiler warnings

* Fix compiler warnings

10 years agointr: Don't embed struct thread in intr_info
Sepherosa Ziehau [Sat, 27 Apr 2013 01:54:27 +0000 (09:54 +0800)]
intr: Don't embed struct thread in intr_info

After the per-cpu IDT support, the intr_info array grows so large that
embedding struct thread in intr_info wastes too much memory.  After this
commit, the intr_info.i_thread is allocated on demand.

Noticed-by: dillon@
10 years agokernel/ng_iface: Add missing braces.
Sascha Wildner [Sat, 27 Apr 2013 01:03:29 +0000 (03:03 +0200)]
kernel/ng_iface: Add missing braces.

10 years agokernel/hptiop: Add missing braces.
Sascha Wildner [Sat, 27 Apr 2013 00:57:05 +0000 (02:57 +0200)]
kernel/hptiop: Add missing braces.

10 years agoRemove some trailing whitespace in the manpages.
Sascha Wildner [Wed, 24 Apr 2013 18:18:39 +0000 (20:18 +0200)]
Remove some trailing whitespace in the manpages.

10 years agogpio/dsched/devfs: Fix wrong lock checks.
Sascha Wildner [Tue, 23 Apr 2013 22:15:05 +0000 (00:15 +0200)]
gpio/dsched/devfs: Fix wrong lock checks.