dragonfly.git
15 years agoHAMMER 60E/Many: Mirroring, bug fixes
Matthew Dillon [Mon, 7 Jul 2008 00:24:31 +0000 (00:24 +0000)]
HAMMER 60E/Many: Mirroring, bug fixes

* Work on the mirror_tid propagation code.  The code now retries on
  EDEADLK so propagation is guaranteed to reach the root.

* Get most of the mirror_write code working.

* Add PFS support for NFS exports.  Change fid_reserved to fid_ext and use
  it to store the localization parameter that selects the PFS.  This isn't
  well tested yet.

* BUGFIX: Fix a bug in vol0_last_tid updates.  Flush sequences might
  not always update the field, creating issues with mirroring and snapshots.

* BUGFIX: Properly update the volume header CRC.

* CLEANUP: Fix some obj_id's that were u_int64_t's. They should be int64_t's.

* CLEANUP: #if 0 out unused code, remove other bits of unused code.

15 years agoEnsure AP is associated before we return.
Thomas Nikolajsen [Mon, 7 Jul 2008 00:00:56 +0000 (00:00 +0000)]
Ensure AP is associated before we return.

Otherwise further rc.d processing, eg dhclient,
can fail to get working network connection.

15 years agoFix typo.
Thomas Nikolajsen [Sun, 6 Jul 2008 23:56:32 +0000 (23:56 +0000)]
Fix typo.

15 years agoDescribe which FW package is causing error;
Thomas Nikolajsen [Sun, 6 Jul 2008 23:55:51 +0000 (23:55 +0000)]
Describe which FW package is causing error;
we have multiple FW packages in base system.

15 years agoUpdate etc/inetd.conf:
Thomas Nikolajsen [Sun, 6 Jul 2008 23:50:19 +0000 (23:50 +0000)]
Update etc/inetd.conf:
 - uucp removed from base system 5 years ago
 - kerberosIV removed from base system 4 years ago
 - pcnfsd removed from base system 14 years ago
 - change path in examples from /usr/local/ to /usr/pkg/
   as we changed from ports to pkgsrc several years ago

15 years agoChange soopt_mcopyin() and soopt_mcopyout() to not modify soopt_val and
Nicolas Thery [Sun, 6 Jul 2008 19:01:57 +0000 (19:01 +0000)]
Change soopt_mcopyin() and soopt_mcopyout() to not modify soopt_val and
soopt_valsize.  This fixes a "already free" panic when so_pru_ctloutput()
kfree()'s soopt_val.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Reviewed-by: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
15 years agoAdd Makefile that compiles serial port enabled boot loader.
Michael Neumann [Sun, 6 Jul 2008 17:20:16 +0000 (17:20 +0000)]
Add Makefile that compiles serial port enabled boot loader.

15 years agoExtend boot loader so that it can be compiled to work over a serial port.
Michael Neumann [Sun, 6 Jul 2008 17:17:01 +0000 (17:17 +0000)]
Extend boot loader so that it can be compiled to work over a serial port.

Obtained-From: FreeBSD

15 years agoNuke unused macro and comment
Sepherosa Ziehau [Sun, 6 Jul 2008 09:17:12 +0000 (09:17 +0000)]
Nuke unused macro and comment

15 years agoPrint chip informantion in bge_attach() instead of bge_probe()
Sepherosa Ziehau [Sun, 6 Jul 2008 08:46:33 +0000 (08:46 +0000)]
Print chip informantion in bge_attach() instead of bge_probe()

15 years agoAdjust default interrupt moderation variables
Sepherosa Ziehau [Sun, 6 Jul 2008 08:13:46 +0000 (08:13 +0000)]
Adjust default interrupt moderation variables

15 years agoFor PCI Express devices:
Sepherosa Ziehau [Sun, 6 Jul 2008 06:47:10 +0000 (06:47 +0000)]
For PCI Express devices:
1) Adjust max read request size to 4Kbytes
2) Turn on FIFO_LONG_BURST in RDMA during bge_blockinit()

Though 1) does not seem to have much to do with the poor TX performance (*)
observed on PCI Express bge(4), 2) does fix the problem.

Obtained-from: tg3

# (*)
# http://lists.freebsd.org/pipermail/freebsd-net/2007-June/014373.html
# FreeBSD kern/119361

15 years agoTX coalesce ticks can't be more than 1023
Sepherosa Ziehau [Sun, 6 Jul 2008 05:54:09 +0000 (05:54 +0000)]
TX coalesce ticks can't be more than 1023

Obtained-from: tg3

15 years agoAdd bits for PCI Express device control register
Sepherosa Ziehau [Sun, 6 Jul 2008 05:47:14 +0000 (05:47 +0000)]
Add bits for PCI Express device control register

15 years agoError out if no volumes are specified instead of core-dumping.
Matthew Dillon [Sat, 5 Jul 2008 23:59:38 +0000 (23:59 +0000)]
Error out if no volumes are specified instead of core-dumping.

Submitted-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
15 years agoHAMMER 60D/Many: Mirroring, bug fixes
Matthew Dillon [Sat, 5 Jul 2008 18:59:28 +0000 (18:59 +0000)]
HAMMER 60D/Many: Mirroring, bug fixes

* Add more mirroring infrastructure.

* Fix support for unix domain sockets.

Reported-by: Gergo Szakal <bastyaelvtars@gmail.com>,
     Rumko <rumcic@gmail.com>

15 years agoIf boot verbose, print asicrev, chiprev and bus type.
Sepherosa Ziehau [Sat, 5 Jul 2008 13:37:17 +0000 (13:37 +0000)]
If boot verbose, print asicrev, chiprev and bus type.

15 years ago- Add delay in MII registers reading
Sepherosa Ziehau [Sat, 5 Jul 2008 12:22:37 +0000 (12:22 +0000)]
- Add delay in MII registers reading
- Minor style changes

15 years agoUse hardware timer to simulate interrupt moderation.
Sepherosa Ziehau [Sat, 5 Jul 2008 07:29:44 +0000 (07:29 +0000)]
Use hardware timer to simulate interrupt moderation.

hw.nfeX.imtimer -> 0  no interrupt moderation at all.
hw.nfeX.imtimer -> -Y hardware timer simulated interrupt moderation,
                      the simultated interrupt moderation timer will
                      be set to Y.
hw.nfeX.imtimer -> Y  hardware timer only interrupt moderation,
                      hardware timer will be set to Y.

Set hw.nfeX.imtimer to -125 (8000Hz) should work on most system.

With heavier interrupt moderation (e.g. hw.nfeX.imtimer to -250), it is
recommended to increase hw.nfe.rx_ring_count tunable to a higher value
(e.g. 512), since the default value (128) is obviously too small.

15 years agoSplit hardware capabilities and softc flags
Sepherosa Ziehau [Sat, 5 Jul 2008 05:34:31 +0000 (05:34 +0000)]
Split hardware capabilities and softc flags

15 years agoFirst step to split hardware capabilities and softc flags
Sepherosa Ziehau [Sat, 5 Jul 2008 05:16:54 +0000 (05:16 +0000)]
First step to split hardware capabilities and softc flags

15 years agoNuke unused field
Sepherosa Ziehau [Sat, 5 Jul 2008 05:02:42 +0000 (05:02 +0000)]
Nuke unused field

15 years agoHAMMER 60C/many: Mirroring
Matthew Dillon [Fri, 4 Jul 2008 07:25:36 +0000 (07:25 +0000)]
HAMMER 60C/many: Mirroring

* Clean up the B-Tree mirror_tid update code, rewiring it a bit
  to reduce code pollution.

* Properly detect the mirroring mode (master, slave, or no-mirror mode)
  via the pfs configuration.

15 years agoHAMMER Utilities: Stabilization
Matthew Dillon [Fri, 4 Jul 2008 07:20:43 +0000 (07:20 +0000)]
HAMMER Utilities: Stabilization

* Fix a bug in mirror-copy that was causing extra process forks to occur.

15 years agoRegenerate the pciconf(8) database from the following files:
Sascha Wildner [Thu, 3 Jul 2008 10:42:37 +0000 (10:42 +0000)]
Regenerate the pciconf(8) database from the following files:

Hart:    Jan 22, 2008 (version 671)
Boemler: Jul  1, 2008
Mares:   Jul  1, 2008

15 years agoMake ip_forward public, so that it can be used from other places as well.
Simon Schubert [Thu, 3 Jul 2008 08:22:36 +0000 (08:22 +0000)]
Make ip_forward public, so that it can be used from other places as well.

Ok'ed:  sephe@

15 years agoHAMMER Utilities: Sync with recent work.
Matthew Dillon [Thu, 3 Jul 2008 06:36:27 +0000 (06:36 +0000)]
HAMMER Utilities: Sync with recent work.

* The masterid and slave options are now pseudo-fs options and not general
  mount options.

15 years agoHAMMER 60B/many: Stabilization
Matthew Dillon [Thu, 3 Jul 2008 04:24:51 +0000 (04:24 +0000)]
HAMMER 60B/many: Stabilization

* Redo the estimated space usage calculation, it was horribly broken.
  There may still be issues with read+write memory maps.

* Fix a bug in the reblocker that allowed it to exhaust all available
  space on the media.  While the reblocker eventually compacts the media
  it can actually require additional disk space while running.

Note that file deletions in normal history retention mode do not recover
any space unless followed by pruning, and may even require additional space.
If worse comes to worse a full filesystem might have to be remounted in
nohistory mode to recover space.

Reported-by: Gergo Szakal <bastyaelvtars@gmail.com>
15 years agoHAMMER Utilities: Mirroring and pseudo-fs directives
Matthew Dillon [Wed, 2 Jul 2008 22:05:59 +0000 (22:05 +0000)]
HAMMER Utilities: Mirroring and pseudo-fs directives

* Add mirror-read, mirror-write, and mirror-copy.

* Replace the pseudofs directive with pfs-status, pfs-create, and pfs-update.

  Create a pseudofs configuration infrastructure.  Configuration parameters
  can be specified via pfs-create and pfs-update for any HAMMER filesystem or
  HAMMER pseudo-filesystem.  This is basically how you tell HAMMER that
  a particular pfs is a master or slave, and allows both a unique and a shared
  uuid to be associated with the pfs.  The mirroring code will only mirror
  to targets with the same shared uuid as the master sourcing the data.

15 years agoHAMMER 60A/many: Mirroring work
Matthew Dillon [Wed, 2 Jul 2008 21:57:54 +0000 (21:57 +0000)]
HAMMER 60A/many: Mirroring work

* Add a pseudo-fs structure for tracking pseudo-fs configurations.

* Add pseudo-fs status and configuration ioctls

* Fix a b-tree node deletion race that could result in an
  assertion (reported by Rumko <rumcic@gmail.com>)

15 years agoDon't try to run newaliases at all. This happens anyways on boot.
Simon Schubert [Wed, 2 Jul 2008 05:40:43 +0000 (05:40 +0000)]
Don't try to run newaliases at all.  This happens anyways on boot.

15 years agoHAMMER 59J/Many: Features
Matthew Dillon [Tue, 1 Jul 2008 17:30:42 +0000 (17:30 +0000)]
HAMMER 59J/Many: Features

* The pruning code now disposes of any disconnected inodes it encounters.
  A disconnected inode can be created when a process holds an open
  descriptor on an unlink()'d file, and the machine then crashes.

15 years agoHAMMER 59I/Many: Stabilization pass
Matthew Dillon [Tue, 1 Jul 2008 16:48:51 +0000 (16:48 +0000)]
HAMMER 59I/Many: Stabilization pass

* Move calls to hammer_flusher_clean_loose_ios() to handle more cases.
  This fixes a kmalloc memory blowout that can occur when removing
  a 1.6TB file.

15 years agoFix [gs]etsockopt(IP_HDRINCL) which allows mere mortals like me to obtain
Hasso Tepper [Tue, 1 Jul 2008 08:21:25 +0000 (08:21 +0000)]
Fix [gs]etsockopt(IP_HDRINCL) which allows mere mortals like me to obtain
IP addresses via DHCP again.

15 years agoHAMMER 59H/Many: Stabilization pass
Matthew Dillon [Tue, 1 Jul 2008 04:54:25 +0000 (04:54 +0000)]
HAMMER 59H/Many: Stabilization pass

* Fix a bug introduced in 59G that will corrupt the filesystem when it
  becomes full.  A pointer was not being NULL'd out and caused
  hammer_blockmap_reserve() to return a bogus offset when the loop
  could find no free space.

15 years agoHAMMER 59G/Many: Stabilization pass (low memory issues)
Matthew Dillon [Tue, 1 Jul 2008 02:08:58 +0000 (02:08 +0000)]
HAMMER 59G/Many: Stabilization pass (low memory issues)

Make adjustments in an attempt to remove deadlocks from the pageout and
buffer flushing paths when a system is low on memory.

* Restructure the low level storage allocator to use layer2->append_off
  and to move the blockmap lock deeper into the routine, pass the buffer
  ops.

* Do kmalloc()'s of critical structures accessed by the backend with
  M_USE_RESERVE.

* Have hammer_vop_write() call bwillwrite() unconditionally, even if
  called from the pageout daemon.  Do not release or relock the vnode
  at all.

  Theoretically bwillwrite() in the pageout path should still allow
  strategy calls from the buf_daemon threads to proceed, and not deadlock.

Reported-by: Gergo Szakal <bastyaelvtars@gmail.com>
15 years agoFix numerous pageout daemon -> buffer cache deadlocks in the main system.
Matthew Dillon [Tue, 1 Jul 2008 02:02:56 +0000 (02:02 +0000)]
Fix numerous pageout daemon -> buffer cache deadlocks in the main system.
These issues usually only occur on systems with small amounts of ram
but it is possible to trigger them on any system.

* Get rid of the IO_NOBWILL hack.  Just have the VN device use IO_DIRECT,
  which will clean out the buffer on completion of the write.

* Add a timeout argument to vm_wait().

* Add a thread->td_flags flag called TDF_SYSTHREAD.  kmalloc()'s made
  from designated threads are allowed to dip into the system reserve
  when allocating pages.  Only the pageout daemon and buf_daemon[_hw] use
  the flag.

* Add a new static procedure, recoverbufpages(), which explicitly tries to
  free buffers and their backing pages on the clean queue.

* Add a new static procedure, bio_page_alloc(), to do all the nasty work
  of allocating a page on behalf of a buffer cache buffer.

  This function will call vm_page_alloc() with VM_ALLOC_SYSTEM to allow
  it to dip into the system reserve.  If the allocation fails this
  function will call recoverbufpages() to try to recycle from VM pages
  from clean buffer cache buffers, and will then attempt to reallocate
  using VM_ALLOC_SYSTEM | VM_ALLOC_INTERRUPT to allow it to dip into
  the interrupt reserve as well.

  Warnings will blare on the console.  If the effort still fails we
  sleep for 1/20 of a second and retry.  The idea though is for all
  the effort above to not result in a failure at the end.

Reported-by: Gergo Szakal <bastyaelvtars@gmail.com>
15 years agoWe are using 4.1.2 really.
Hasso Tepper [Mon, 30 Jun 2008 19:04:49 +0000 (19:04 +0000)]
We are using 4.1.2 really.

15 years agoBuild objc support.
Hasso Tepper [Mon, 30 Jun 2008 12:16:03 +0000 (12:16 +0000)]
Build objc support.

15 years agoMerge from vendor branch GCC:
Hasso Tepper [Mon, 30 Jun 2008 11:22:39 +0000 (11:22 +0000)]
Merge from vendor branch GCC:
Add objc to the gcc-4.1.2.

15 years agoAdd objc to the gcc-4.1.2.
Hasso Tepper [Mon, 30 Jun 2008 11:22:39 +0000 (11:22 +0000)]
Add objc to the gcc-4.1.2.

15 years agoHAMMER 59F/Many: Stabilization pass
Matthew Dillon [Mon, 30 Jun 2008 04:18:30 +0000 (04:18 +0000)]
HAMMER 59F/Many: Stabilization pass

* Use kmalloc_limit() to calculate a better record limit.  This fixes an
  issue on machines with limited system memory where HAMMER could blow
  out its kmalloc pool by allocating too many records.

15 years agoFix a low-memory deadlock in the VM system which can occur on systems
Matthew Dillon [Mon, 30 Jun 2008 03:57:41 +0000 (03:57 +0000)]
Fix a low-memory deadlock in the VM system which can occur on systems
with small amounts of system memory.  The pageout daemon uses LK_TIMELOCK
to avoid deadlocking on a vnode so it can continue operation.  This only
works if lk_timo is non-zero, but all filesystems initialize their vnodes
with a timeout of zero so the feature is defeated.  Adjust allocvnode()
to guarantee that lk_timo is never zero.

15 years agoAdd a new helper function, kmalloc_limit(). This function returns
Matthew Dillon [Mon, 30 Jun 2008 03:00:36 +0000 (03:00 +0000)]
Add a new helper function, kmalloc_limit().  This function returns
the number of bytes that can be held in a M_XXX kernel memory pool.

15 years agoHAMMER 59E/Many: Stabilization pass
Matthew Dillon [Mon, 30 Jun 2008 02:45:30 +0000 (02:45 +0000)]
HAMMER 59E/Many: Stabilization pass

* Sprinkle around calls to hammer_flusher_clean_loose_ios() to clean up
  hammer buffers with no buffer cache buffer associations, so they can't
  build up and blow out kernel memory.

* Fix a bug when deleting large files where not all records were being
  properly moved to the new flush group.

* Fix a bug when truncating large files where a trunction followed by
  write()s followed by another truncation would incorrectly reorder the
  writes() in the middle to occur after the second truncation.

15 years agoFix a buf_daemon performance issue when running on machines with small
Matthew Dillon [Mon, 30 Jun 2008 02:11:53 +0000 (02:11 +0000)]
Fix a buf_daemon performance issue when running on machines with small
amounts of ram.  The daemon was hitting a 1/2 sleep case that it should
not have been hitting.

15 years agoHAMMER 59D/Many: Stabilization pass
Matthew Dillon [Mon, 30 Jun 2008 00:03:55 +0000 (00:03 +0000)]
HAMMER 59D/Many: Stabilization pass

* Fix a panic that occurs when the crash recovery undo space is larger
  then conveniently fits in the buffer cache.

* Fix a bug in the truncation code (detected by fsx).  The bug was related
  to moving an inode from one flush group to another (which itself was done
  to fix a bug related to blowing out the buffer cache).

15 years agoClarify comment.
Simon Schubert [Sun, 29 Jun 2008 22:22:17 +0000 (22:22 +0000)]
Clarify comment.

15 years agoFix a NULL pointer dereference when a DDB 'ps' attempts to
Matthew Dillon [Sun, 29 Jun 2008 21:38:21 +0000 (21:38 +0000)]
Fix a NULL pointer dereference when a DDB 'ps' attempts to
list a process which has no LWPs associated with it.

15 years agoFix typo in sln(4) PCI ID.
Sascha Wildner [Sun, 29 Jun 2008 20:45:44 +0000 (20:45 +0000)]
Fix typo in sln(4) PCI ID.

15 years agoRegenerate
Sascha Wildner [Sun, 29 Jun 2008 20:43:49 +0000 (20:43 +0000)]
Regenerate

15 years agoFix typo in sln(4) PCI ID.
Sascha Wildner [Sun, 29 Jun 2008 20:33:57 +0000 (20:33 +0000)]
Fix typo in sln(4) PCI ID.

15 years agoFix an issue where CAM would attempt to illegally get a lockmgr() lock
Matthew Dillon [Sun, 29 Jun 2008 19:15:34 +0000 (19:15 +0000)]
Fix an issue where CAM would attempt to illegally get a lockmgr() lock
from an interrupt via xpt_done().  Use a spin lock instead.

Fix an issue where camisr_runqueue() was not protecting sim->sim_doneq
which could then race against an interrupt via xpt_done() and corrupt
the list.

15 years agoAdjust comments.
Matthew Dillon [Sun, 29 Jun 2008 19:04:02 +0000 (19:04 +0000)]
Adjust comments.

Reported-by: Jordan Gordeev <jgordeev@dir.bg>
15 years agoClean up stale comment and unused umount.
Simon Schubert [Sun, 29 Jun 2008 10:34:04 +0000 (10:34 +0000)]
Clean up stale comment and unused umount.

Noticed-by: swildner@
15 years agoDon't run binaries in the new built root, but use host binaries instead.
Simon Schubert [Sun, 29 Jun 2008 10:23:23 +0000 (10:23 +0000)]
Don't run binaries in the new built root, but use host binaries instead.

This allows us to do cross-builds (older host kernel) again, which was
broken for some time now.

The mkfontdir command was not changed yet, but this is no regression.

15 years agoHAMMER 59E/Many: Stabilization pass - fixes for large file issues
Matthew Dillon [Sun, 29 Jun 2008 07:50:40 +0000 (07:50 +0000)]
HAMMER 59E/Many: Stabilization pass - fixes for large file issues

* Correct a bug related to inodes moving between flush groups (when
  truncating a large file).  Some records were not being moved and
  cause an assertion later on.

* Fix a leak of B_LOCKED buffers which could occur under heavy loads.
  Eventually enough build up to deadlock the buffer cache.

15 years agoHAMMER 59D/Many: Sync with buffer cache changes in HEAD.
Matthew Dillon [Sat, 28 Jun 2008 23:50:37 +0000 (23:50 +0000)]
HAMMER 59D/Many: Sync with buffer cache changes in HEAD.

* Adjust hammer to limit dirty meta-data buffers based on total bytes
  rather then total buffers.

* Limit to 1/4 the buffer cache limit (for now)... a better solution
  is needed.

15 years agoFix hopefully all possible deadlocks that can occur when mixed block sizes
Matthew Dillon [Sat, 28 Jun 2008 23:45:20 +0000 (23:45 +0000)]
Fix hopefully all possible deadlocks that can occur when mixed block sizes
are used with the buffer cache.  The fix is simply to base the limiting
and flushing code on a byte count rather then a buffer count.

This will allow UFS to utilizes a greater number of dirty buffers and
will cause HAMMER to use fewer.  This also makes tuning the buffer cache
a whole lot easier.

15 years agoHAMMER 59C/Many: Stabilization pass - fixes for large file issues
Matthew Dillon [Sat, 28 Jun 2008 18:10:55 +0000 (18:10 +0000)]
HAMMER 59C/Many: Stabilization pass - fixes for large file issues

* Rename hammer_delete_range_all() to hammer_delete_clean().  This function
  is no longer responsible for deleting data and db records when a file
  is removed.  The normal hammer_delete_range() function now does that for
  all cases.

* Adjust hammer_delete_range() to not restart at offset 0 when it hits a
  deadlock or must defer the remainder of the operation to another flush
  cycle.  When removing very large files (greater then 500GB) the constant
  restarts resulted in exponential delays.

  Instead the function restarts near where it had left off the previous try.

* Change ip->sync_trunc_off's dynamics so it can be used to cache the
  restart offset.  The truncation state can now be left intact on the
  backend and the frontend will merge new truncations into it instead
  of replacing the truncation.

  Add a new field, ip->save_trunc_off to handle the append overwrite
  check optimization (sync_trunc_off used to be used for that, no longer).

* Fix minor bugs, and use the new bwillwrite() API.

* Remove the #if 0'd out cluster_write() code entirely (it never worked
  anyway).  The new buffer cache subsystem in the kernel allows bdwrite()
  to be used with no real penalty.

15 years agoReplace the bwillwrite() subsystem to make it more fair to processes.
Matthew Dillon [Sat, 28 Jun 2008 17:59:51 +0000 (17:59 +0000)]
Replace the bwillwrite() subsystem to make it more fair to processes.

* Add new API functions, bwillread(), bwillwrite(), bwillinode() which
  the kernel calls when it intends to read, write, or make inode
  modifications.

* Redo the backend.  Add bd_heatup() and bd_wait().  bd_heatup() heats up
  the buf_daemon, starting it flushing before we hit any blocking conditions
  (similar to the previous algorith).

* The new bwill*() blocking functions no longer introduce escalating delays
  to keep the number of dirty buffers under control.  Instead it takes a page
  from HAMMER and estimates the load caused by the caller, then waits for a
  specific number of dirty buffers to complete their write I/O's before
  returning.  If the buffers can be retired quickly these functions will
  return more quickly.

15 years agoRemove extra '.'
Sascha Wildner [Sat, 28 Jun 2008 14:51:50 +0000 (14:51 +0000)]
Remove extra '.'

15 years ago* Use literal displays instead of .Li
Sascha Wildner [Sat, 28 Jun 2008 14:48:50 +0000 (14:48 +0000)]
* Use literal displays instead of .Li

* Comment out empty section

* Sync SYNOPSIS

* Use .Pa for paths, .Xr for manual page references and .Ex for exit status

15 years ago* Remove empty lines and trailing whitespace.
Sascha Wildner [Sat, 28 Jun 2008 14:23:59 +0000 (14:23 +0000)]
* Remove empty lines and trailing whitespace.

* Bump date for r1.26.

15 years agostyle(9)
Sascha Wildner [Sat, 28 Jun 2008 14:18:00 +0000 (14:18 +0000)]
style(9)

15 years agoBump the sortq_lost check from 8 to 128, letting the disk optimally read or
Matthew Dillon [Sat, 28 Jun 2008 01:41:32 +0000 (01:41 +0000)]
Bump the sortq_lost check from 8 to 128, letting the disk optimally read or
write a larger swath before forcing through long-delayed requests.

15 years agoFix a system performance issue created by ata_sort_queue(). This function
Matthew Dillon [Sat, 28 Jun 2008 01:06:40 +0000 (01:06 +0000)]
Fix a system performance issue created by ata_sort_queue().  This function
implements an elevator sort but it also allows requests to be delayed
indefinitely when other requests continually get inserted in front of them.
HAMMER's almost log-linear writing really exposes this issue.

The fix is to count how many times a request got delayed due to an insertion.
If the count exceeds 8, the new request is placed at the end of the queue and
set as the new freeze point.

15 years agoHAMMER 59B/Many: Stabilization pass - fixes for large file issues
Matthew Dillon [Fri, 27 Jun 2008 20:56:59 +0000 (20:56 +0000)]
HAMMER 59B/Many: Stabilization pass - fixes for large file issues

* The flusher was trying to flush whole inodes in one pass.  If a large
  (in the 100GB range) file is deleted or truncated this single pass could
  blow out the UNDO FIFO and cause a panic.

  Detect the case and only do a partial flush, then requeue the inode to
  the next flush group and reflush.  This continues until the file is
  completely eradicated or the truncation has completed.

* In addition, the same flusher issue could exhaust the kernel's buffer
  cache with unflushable dirty buffers.  The same fix applies.

* The UNDO FIFO code was calculating available space based on the next
  flush's start position instead of the last flush's start position,
  allowing areas of the UNDO FIFO still subject to a recovery pass
  (if a crash were to occur right then) to be overwritten too soon.

* The pruner and reblocker were doing insufficient UNDO FIFO space checks
  and could blow out the UNDO FIFO.  Fixed.

15 years agoRework stop path.
Sepherosa Ziehau [Fri, 27 Jun 2008 17:03:40 +0000 (17:03 +0000)]
Rework stop path.

Obtained-from: forcedeth

15 years ago- Rename NFE_RXTX_V[32]MAGIC to NFE_RXTX_DESC_V[32].
Sepherosa Ziehau [Fri, 27 Jun 2008 16:30:53 +0000 (16:30 +0000)]
- Rename NFE_RXTX_V[32]MAGIC to NFE_RXTX_DESC_V[32].
- Change NFE_RXTX_DESC_V3 from 0x2200 to 0xc02200; it is quite interesting
  the thing actually worked.
- Add rxtxctl_desc in softc, which stores the desc type of rxtxctl.  Set
  it up during attach.
- Add power control fixes on attach and init path.

Obtained-from: forcedeth

15 years agoFix a typo so that old netgraph builds again.
Sascha Wildner [Fri, 27 Jun 2008 14:02:14 +0000 (14:02 +0000)]
Fix a typo so that old netgraph builds again.

15 years ago- Disable WOL during attach, don't mess with it during init
Sepherosa Ziehau [Fri, 27 Jun 2008 13:47:36 +0000 (13:47 +0000)]
- Disable WOL during attach, don't mess with it during init
- NFE_WOL_MAGIC -> NFE_WOL_ENABLE

Obtained-from: forthdeth

15 years agoAdd flag to indicate that the NIC does not have power control capability.
Sepherosa Ziehau [Fri, 27 Jun 2008 13:30:56 +0000 (13:30 +0000)]
Add flag to indicate that the NIC does not have power control capability.
Model numbers from forcedeth.

15 years agoAdd nfe(4)
Sepherosa Ziehau [Fri, 27 Jun 2008 12:49:34 +0000 (12:49 +0000)]
Add nfe(4)

Suggested-by: Chris Turner <c.turner@199technologies.org>
15 years agoAdd man page entry for "hammer snapshot".
Michael Neumann [Fri, 27 Jun 2008 11:57:49 +0000 (11:57 +0000)]
Add man page entry for "hammer snapshot".

15 years agofxp_stop needs to be serialized
Sepherosa Ziehau [Fri, 27 Jun 2008 10:55:23 +0000 (10:55 +0000)]
fxp_stop needs to be serialized

15 years agoDrop out of place readline function declarations.
Simon Schubert [Fri, 27 Jun 2008 08:09:12 +0000 (08:09 +0000)]
Drop out of place readline function declarations.

15 years agoStop building libreadline.
Simon Schubert [Fri, 27 Jun 2008 08:08:25 +0000 (08:08 +0000)]
Stop building libreadline.

Libreadline has not been used for a while, only its headers.
Libedit now provides readline headers, so we can drop readline.

15 years agoInstall libedit's readline headers.
Simon Schubert [Fri, 27 Jun 2008 08:06:48 +0000 (08:06 +0000)]
Install libedit's readline headers.

Also install compat headers which are sometimes used.

15 years agoIncrease the default request timeout from 5 seconds to 10 seconds.
Matthew Dillon [Fri, 27 Jun 2008 01:24:46 +0000 (01:24 +0000)]
Increase the default request timeout from 5 seconds to 10 seconds.

Using advise from Volker Theile of the FreeNAS project via:
http://wiki.freebsd.org/JeremyChadwick/ATA_issues_and_troubleshooting

15 years agodummy_thr does not have to be committed and pthread_t might not even
Matthew Dillon [Fri, 27 Jun 2008 01:15:39 +0000 (01:15 +0000)]
dummy_thr does not have to be committed and pthread_t might not even
be a pointer on some systems.

15 years agoApply patch supplied in FreeBSD-PR to ata-raid code:
Matthew Dillon [Fri, 27 Jun 2008 00:03:56 +0000 (00:03 +0000)]
Apply patch supplied in FreeBSD-PR to ata-raid code:

"A drive that was once part of an ataraid device, when added back to the
machine that it was on, shows up as a new ataraid device. This new ataraid
device tries to use all the drives that were originally in the RAID.
Results can range from a confusion to a real mess."

Obtained-from: http://www.freebsd.org/cgi/query-pr.cgi?pr=121899&cat=kern
Author: Stef Walter <stef@memberwebs.com>

15 years agoAdd files and options lines for NETGRAPH7
Matthew Dillon [Thu, 26 Jun 2008 23:24:11 +0000 (23:24 +0000)]
Add files and options lines for NETGRAPH7

15 years agoAdd additional atomic ops from FreeBSD.
Matthew Dillon [Thu, 26 Jun 2008 23:06:52 +0000 (23:06 +0000)]
Add additional atomic ops from FreeBSD.

Obtained-from: FreeBSD

15 years agoNetgraph port from FreeBSD - initial porting work
Matthew Dillon [Thu, 26 Jun 2008 23:05:40 +0000 (23:05 +0000)]
Netgraph port from FreeBSD - initial porting work

* Use relative #include's as appropriate so the code doesn't
  dig into the original netgraph/ directory.

* Move FBSDID's and add DragonFly ids.

* Fix improper uses of M_NOWAIT.

* Fix uses of M_NOWAIT which should be MB_DONTWAIT and vise-versa
  (also forward to Julian).

* Add a dragonfly.h compatibility header.

* NOTE: m_tag_alloc() in DFly takes MB_ flags.

15 years agoFallback using a default snapshot name if just a directory is supplied
Michael Neumann [Thu, 26 Jun 2008 20:43:45 +0000 (20:43 +0000)]
Fallback using a default snapshot name if just a directory is supplied
(e.g. hammer snapshot /mysnapshots will use /mysnapshots/snap-%Y%m%d-%H%M).

15 years agoMerge from vendor branch NETGRAPH:
Matthew Dillon [Thu, 26 Jun 2008 19:34:33 +0000 (19:34 +0000)]
Merge from vendor branch NETGRAPH:
Vendor import of netgraph from FreeBSD-current 20080626

15 years agoVendor import of netgraph from FreeBSD-current 20080626 vendor/NETGRAPH
Matthew Dillon [Thu, 26 Jun 2008 19:34:33 +0000 (19:34 +0000)]
Vendor import of netgraph from FreeBSD-current 20080626

15 years agoAdd KTR_HAMMER
Matthew Dillon [Thu, 26 Jun 2008 18:54:50 +0000 (18:54 +0000)]
Add KTR_HAMMER

15 years agoMake sure UFS disallows mknod()'s with type VDIR.
Matthew Dillon [Thu, 26 Jun 2008 18:53:14 +0000 (18:53 +0000)]
Make sure UFS disallows mknod()'s with type VDIR.

15 years agoWe only need to determine the softlink_dir when no filesystem is
Michael Neumann [Thu, 26 Jun 2008 16:13:43 +0000 (16:13 +0000)]
We only need to determine the softlink_dir when no filesystem is
explicitly specified.

15 years agoUse strftime to produce the snapshot name, for example:
Michael Neumann [Thu, 26 Jun 2008 15:56:44 +0000 (15:56 +0000)]
Use strftime to produce the snapshot name, for example:

    hammer snapshot "/mysnapshots/snap-%Y-%m-%dT%H:%M:%S"

Usage is now:

    hammer snapshot <softlink-dir-fmt>
    hammer snapshot <filesystem> <softlink-dir-fmt>

15 years agoAdapt usage string from cmd_prune.c.
Michael Neumann [Thu, 26 Jun 2008 15:12:21 +0000 (15:12 +0000)]
Adapt usage string from cmd_prune.c.

15 years agoHAMMER Utilities: Add "slave" option to hammer_mount.
Matthew Dillon [Thu, 26 Jun 2008 15:03:47 +0000 (15:03 +0000)]
HAMMER Utilities: Add "slave" option to hammer_mount.

* Add the "slave" mount option for hammer mounts.  This option will allow
  a mounted hammer filesystem to be a mirroring and pruning target but
  disallow user-level modifications.

15 years agoMake msk(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Thu, 26 Jun 2008 13:08:55 +0000 (13:08 +0000)]
Make msk(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoMake bfe(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Thu, 26 Jun 2008 12:05:19 +0000 (12:05 +0000)]
Make bfe(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoHAMMER Utilities: Sync with 59A
Matthew Dillon [Thu, 26 Jun 2008 04:07:57 +0000 (04:07 +0000)]
HAMMER Utilities: Sync with 59A

* Add mirror-read, mirror-write, and status directives.

15 years agoHAMMER 59A/Many: Mirroring related work (and one bug fix).
Matthew Dillon [Thu, 26 Jun 2008 04:06:23 +0000 (04:06 +0000)]
HAMMER 59A/Many: Mirroring related work (and one bug fix).

* BUG FIX: Fix a bug in directory hashkey generation.  The iterator could
  sometimes conflict with a key already on-disk and interfere with a pending
  deletion.  The chance of this occuring was miniscule but not 0.  Now fixed.

  The fix also revamps the directory iterator code, moving it all to one
  place and removing it from two other places.

* PRUNING CHANGE: The pruning code no longer shifts the create_tid and
  delete_tid of adjacent records to fill gaps.  This means that historical
  queries must either use snapshot softlinks or use a fine-grained
  transaction id greater then the most recent snapshot softlink.

  fine-grained historical access still works up to the first snapshot
  softlink.

* Clean up the cursor code responsible for acquiring the parent node.

* Add the core mirror ioctl read/write infrastructure.  This work is still
  in progress.

  - ioctl commands
  - pseudofs enhancements, including st_dev munging.
  - mount options
  - transaction id and object id conflictless allocation
  - initial mirror_tid recursion up the B-Tree (not finished)
  - B-Tree mirror scan optimizations to skip sub-hierarchies that do not
    need to be scanned (requires mirror_tid recursion to be 100% working).

15 years agoRemove trailing space.
Sascha Wildner [Wed, 25 Jun 2008 17:51:16 +0000 (17:51 +0000)]
Remove trailing space.

15 years agoMissing TX_UNK -> TX_POLL conversion
Sepherosa Ziehau [Wed, 25 Jun 2008 16:25:58 +0000 (16:25 +0000)]
Missing TX_UNK -> TX_POLL conversion