dragonfly.git
15 years agoAdd ncv.4, nsp.4 and stg.4 manual pages.
Thomas Nikolajsen [Sun, 27 Jul 2008 18:42:15 +0000 (18:42 +0000)]
Add ncv.4, nsp.4 and stg.4 manual pages.

These drivers are already present in DragonFly,
they were present at initial import from FreeBSD,
but manual pages were added to FreeBSD after that time.

Obtained-from: FreeBSD

15 years agodigi/dgb update:
Thomas Nikolajsen [Sun, 27 Jul 2008 18:37:30 +0000 (18:37 +0000)]
digi/dgb update:
 * Add digi.4 manual page.
 * digi.4 is a copy of dgb.4 with minimal brush up.
 * Set dgb driver to deprecated status.
The digi driver was imported from FreeBSD 3+ years ago.

15 years agoAdd uuids.5 to build.
Thomas Nikolajsen [Sun, 27 Jul 2008 18:25:38 +0000 (18:25 +0000)]
Add uuids.5 to build.

15 years agoAdd uuids.5 manual page.
Thomas Nikolajsen [Sun, 27 Jul 2008 18:10:23 +0000 (18:10 +0000)]
Add uuids.5 manual page.

15 years agoFix tcsh crash when autologout is set.
Nuno Antunes [Sun, 27 Jul 2008 17:52:07 +0000 (17:52 +0000)]
Fix tcsh crash when autologout is set.

Note that even with this fix, inserting the correct password after the
autologout timer expires will only unlock the session for the root
user (i don't know why). Any other user will not get its password
accepted as correct, but at least it won't crash.

Obtained from: FreeBSD (PR bin/124191)
Discussed with: matthias

15 years agoAdjust the desiredvnodes (kern.maxvnodes) calculation for machines
Matthew Dillon [Sun, 27 Jul 2008 17:37:52 +0000 (17:37 +0000)]
Adjust the desiredvnodes (kern.maxvnodes) calculation for machines
with 3G+ of ram to prevent it from blowing out KVM.

Reported-by: Michael Neumann <mneumann@ntecs.de>
15 years agoUpdate mount_hammer.8
Thomas Nikolajsen [Sun, 27 Jul 2008 17:12:13 +0000 (17:12 +0000)]
Update mount_hammer.8
 * Update SYNOPSIS to reflect that ':' can be used as separator for specials
 * Rename `mount-options' to `options' to follow mount.8 and
save some space in SYNOPSIS
 * Add Xrefs for HAMMER.5 and gpt.8
 * Use consistent spelling for 'file system'
 * Add fstab(5) part to existing example
 * Add markup

15 years agoAdd description of how to specify sizes.
Thomas Nikolajsen [Sun, 27 Jul 2008 16:47:19 +0000 (16:47 +0000)]
Add description of how to specify sizes.

15 years agoUpdate newfs_hammer.8:
Thomas Nikolajsen [Sun, 27 Jul 2008 16:15:33 +0000 (16:15 +0000)]
Update newfs_hammer.8:
 * Add Xrefs for HAMMER.5 and gpt.8
 * Change Xrefs from disklabel[64].8 to .5
 * Add some markup

15 years agoAdd ifmedia(4) reference.
Sascha Wildner [Sun, 27 Jul 2008 12:46:14 +0000 (12:46 +0000)]
Add ifmedia(4) reference.

15 years agoAdd jme(4).
Sascha Wildner [Sun, 27 Jul 2008 12:02:51 +0000 (12:02 +0000)]
Add jme(4).

15 years agoAdd serializer assertion in all NIC driver interfaces
Sepherosa Ziehau [Sun, 27 Jul 2008 11:26:59 +0000 (11:26 +0000)]
Add serializer assertion in all NIC driver interfaces

15 years agoSwitch to ETHER_INPUT2 on ethernet input path by default:
Sepherosa Ziehau [Sun, 27 Jul 2008 10:06:57 +0000 (10:06 +0000)]
Switch to ETHER_INPUT2 on ethernet input path by default:
- Nuke old ether_input_chain and ether_demux_chain
- Nuke old vlan_input
- Nuke ETHER_INPUT2 kernel option
- Adjust comment about functions on old ether input path
- Adjust NIC drivers which aware ETHER_INPUT2

vlan(4):
Clearing of ifnet.if_vlantrunks is now protected in the following way
    trunks = ifp->if_vlantrunks;
    ifp->if_vlantrunks = NULL;
    netmsg_service_sync();
    kfree(trunks);
Users of ifnet.if_vlantrunks have already been adjusted to aware of this.

bridge(4):
Clearing of ifnet.if_bridge is now protected in the following way
    ifp->if_bridge = NULL;
    netmsg_service_sync();
Users of ifnet.if_bridge have already been adjusted to aware of this.

carp(4):
Remove the LK_NOWAIT lockmgr lock flags; using LK_NOWAIT was actually a
workaround for that lockmgr lock was used in NIC's interrupt routine
(i.e. old ether_input)
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue957>

ipflow:
- Now per-cpu ipflow hash table installs its own ipflow entry instead of
  having ipflow entry duplicated onto each cpu
- Remove the serializer parameter to ipflow_fastforward()
- Comment out ipflow_fastforward() in ef(4) and ppp(4), they need to be
  changed to fit the current ipflow cpu localization model

15 years agoStaticize ether_input
Sepherosa Ziehau [Sun, 27 Jul 2008 03:49:30 +0000 (03:49 +0000)]
Staticize ether_input

15 years agoBorrow comment from ether_input and ether_demux
Sepherosa Ziehau [Sun, 27 Jul 2008 02:52:36 +0000 (02:52 +0000)]
Borrow comment from ether_input and ether_demux

15 years agoAdd function comment about ether_input_chain2
Sepherosa Ziehau [Sun, 27 Jul 2008 02:41:07 +0000 (02:41 +0000)]
Add function comment about ether_input_chain2

15 years agoFix style(9).
Michael Neumann [Sat, 26 Jul 2008 22:31:54 +0000 (22:31 +0000)]
Fix style(9).

15 years agoAn off-by-one malloc size was corrupting the installer's memory,
Matthew Dillon [Sat, 26 Jul 2008 21:24:11 +0000 (21:24 +0000)]
An off-by-one malloc size was corrupting the installer's memory,
causing the time-zone selector to seg-fault.

Submitted-by: Pierre Riteau <pierre.riteau@gmail.com>
15 years agoThere is no ndisapi(9) manual page.
Sascha Wildner [Sat, 26 Jul 2008 18:37:43 +0000 (18:37 +0000)]
There is no ndisapi(9) manual page.

15 years agoAdd jme(4).
Sascha Wildner [Sat, 26 Jul 2008 17:03:53 +0000 (17:03 +0000)]
Add jme(4).

15 years agoRather than putting examples in every wireless driver page, put them in
Sascha Wildner [Sat, 26 Jul 2008 16:25:41 +0000 (16:25 +0000)]
Rather than putting examples in every wireless driver page, put them in
wlan(4) and reference it.

In-discussion-with: hasso, sephe

15 years agoMake bsdcpio the default cpio. Place WITH_GCPIO in make.conf if you want
Peter Avalos [Sat, 26 Jul 2008 16:25:31 +0000 (16:25 +0000)]
Make bsdcpio the default cpio.  Place WITH_GCPIO in make.conf if you want
the GNU version as the default.  Both are still built and installed.

15 years ago- Serialize re_{resume,suspend}()
Sepherosa Ziehau [Sat, 26 Jul 2008 16:12:06 +0000 (16:12 +0000)]
- Serialize re_{resume,suspend}()
- Add serializer assertion in all major NIC driver interfaces

15 years agoAdd wlan to the SYNOPSIS.
Sascha Wildner [Sat, 26 Jul 2008 15:52:39 +0000 (15:52 +0000)]
Add wlan to the SYNOPSIS.

15 years agoBring following change from FreeBSD (yar@freebsd.org):
Sepherosa Ziehau [Sat, 26 Jul 2008 15:36:28 +0000 (15:36 +0000)]
Bring following change from FreeBSD (yar@freebsd.org):
  uipc_syscall.c rev 1.154

  If connect(2) has been interrupted by a signal and therefore the
  connection is to be established asynchronously, behave as in the
  case of non-blocking mode:

  - keep the SS_ISCONNECTING bit set thus indicating that
    the connection establishment is in progress, which is the case
    (clearing the bit in this case was just a bug);

  - return EALREADY, instead of the confusing and unreasonable
    EADDRINUSE, upon further connect(2) attempts on this socket
    until the connection is established (this also brings our
    connect(2) into accord with IEEE Std 1003.1.)

Tested-by: y0netan1@
Reviewed-by: hsu@
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1079>

15 years agoThere is no ndisapi(9) manual page.
Sascha Wildner [Sat, 26 Jul 2008 15:20:50 +0000 (15:20 +0000)]
There is no ndisapi(9) manual page.

15 years agoAdd some standard examples to the wireless driver manual pages and adjust
Sascha Wildner [Sat, 26 Jul 2008 15:09:32 +0000 (15:09 +0000)]
Add some standard examples to the wireless driver manual pages and adjust
the few which already had examples.

Reviewed-by: sephe
15 years agoAdd manpage for jme(4)
Sepherosa Ziehau [Sat, 26 Jul 2008 14:30:39 +0000 (14:30 +0000)]
Add manpage for jme(4)

Obtained-from: FreeBSD

15 years agoAdd jme(4)
Sepherosa Ziehau [Sat, 26 Jul 2008 14:26:30 +0000 (14:26 +0000)]
Add jme(4)

15 years agoAdd support for JMicron Gigabit/Fast Ethernet chips.
Sepherosa Ziehau [Sat, 26 Jul 2008 14:00:31 +0000 (14:00 +0000)]
Add support for JMicron Gigabit/Fast Ethernet chips.

Thank Ethan <ethanhsiao@jmicron.com> for sending me a board and several
very detailed documents about these chips.
Thank Pyun YongHyeon <yongari@freebsd.org> for bridging me and JMicron.

Obtained-from: FreeBSD (yongari@freebsd.org) w/ modification

15 years agoEnable hardware timer simulated interrupt moderation by default.
Sepherosa Ziehau [Sat, 26 Jul 2008 07:41:45 +0000 (07:41 +0000)]
Enable hardware timer simulated interrupt moderation by default.
The interrupt rate is throttled @8000Hz.

15 years agoMove em(4) from MD conf/files to MI conf/files
Sepherosa Ziehau [Sat, 26 Jul 2008 07:15:11 +0000 (07:15 +0000)]
Move em(4) from MD conf/files to MI conf/files

15 years agoHAMMER commit
Matthew Dillon [Sat, 26 Jul 2008 05:36:21 +0000 (05:36 +0000)]
HAMMER commit

* Discard recovered buffers when unmounting a read-only HAMMER mount.

* Discard recovered buffers when an attempted HAMMER mount fails.

* Clean up a transaction that was left open when a HAMMER mount fails to
  locate the root inode.

* Check that an undo record is at least minimally sized so corruption
  does not result in an infinite loop.

Reported-by: Dionysus Blazakis <dion.blazakis@gmail.com>,
    Gergo Szakal <bastyaelvtars@gmail.com>

15 years agoSimplify ether_mport(). This also fixes the bug that m0 is not cleared in
Sepherosa Ziehau [Sat, 26 Jul 2008 04:49:37 +0000 (04:49 +0000)]
Simplify ether_mport().  This also fixes the bug that m0 is not cleared in
the first place, which causes caller panik.

Reported-by: elekktretterr@exemail.com.au
15 years agoRemove reference to ndisapi(9) which doesn't exist.
Sascha Wildner [Sat, 26 Jul 2008 00:36:35 +0000 (00:36 +0000)]
Remove reference to ndisapi(9) which doesn't exist.

15 years agoRemove some *_load lines for stuff we don't have.
Sascha Wildner [Sat, 26 Jul 2008 00:21:30 +0000 (00:21 +0000)]
Remove some *_load lines for stuff we don't have.

15 years agoMention loader_color (for a color version of Fred in the loader menu).
Sascha Wildner [Fri, 25 Jul 2008 22:28:16 +0000 (22:28 +0000)]
Mention loader_color (for a color version of Fred in the loader menu).

15 years agoFix typos.
Sascha Wildner [Fri, 25 Jul 2008 03:17:15 +0000 (03:17 +0000)]
Fix typos.

15 years agoDocument -f.
Sascha Wildner [Fri, 25 Jul 2008 03:17:03 +0000 (03:17 +0000)]
Document -f.

15 years ago* Shuffle things around a bit for better structure.
Sascha Wildner [Fri, 25 Jul 2008 01:21:06 +0000 (01:21 +0000)]
* Shuffle things around a bit for better structure.

* Merge the description of default history retention and snapshots into
  one section. Emphasize that the usual way of history access is via
  snapshots.

* Reword the description of what pruning does.

* Expand the snapshot example a bit.

15 years agoMake -pthread a complete alias to -lpthread, not only in !shared case.
Simon Schubert [Thu, 24 Jul 2008 21:45:10 +0000 (21:45 +0000)]
Make -pthread a complete alias to -lpthread, not only in !shared case.

Discussed-with:  hasso@ (pro), joerg@ (con)
Pointed-out-by: hasso@
15 years agoChange newfs_hammer to reserve a minimum of 100M for the UNDO FIFO. Any
Matthew Dillon [Thu, 24 Jul 2008 05:40:14 +0000 (05:40 +0000)]
Change newfs_hammer to reserve a minimum of 100M for the UNDO FIFO.  Any
smaller and we risk a filesystem panic due to insufficient UNDO space.

Add warnings to newfs_hammer when the created filesystem is fairly small.

Reported-by: M.K. <mk@freeweb.ozi.nu>:
15 years agoFix LINT now that we build with -Werror-implicit-function-declaration.
Sascha Wildner [Thu, 24 Jul 2008 03:26:46 +0000 (03:26 +0000)]
Fix LINT now that we build with -Werror-implicit-function-declaration.

Also fix some issues with too many arguments being passed to isa_dmastart()
and isa_dmadone().

15 years agoRemove stopgap definition of TAILQ_FOREACH_SAFE.
Sascha Wildner [Thu, 24 Jul 2008 01:27:47 +0000 (01:27 +0000)]
Remove stopgap definition of TAILQ_FOREACH_SAFE.

15 years agoDocument TAILQ_FOREACH_SAFE.
Sascha Wildner [Thu, 24 Jul 2008 01:24:24 +0000 (01:24 +0000)]
Document TAILQ_FOREACH_SAFE.

Taken-from: FreeBSD

15 years agoSync with FreeBSD (adds DragonFly 2.0).
Sascha Wildner [Thu, 24 Jul 2008 00:17:29 +0000 (00:17 +0000)]
Sync with FreeBSD (adds DragonFly 2.0).

15 years agoSynchronize some of the machine-independant AMD64 bits.
Matthew Dillon [Wed, 23 Jul 2008 17:22:33 +0000 (17:22 +0000)]
Synchronize some of the machine-independant AMD64 bits.

Obtained-from: Jordan Gordeev <jgordeev@dir.bg>

15 years agoSynchronize some of the machine-independant AMD64 bits.
Matthew Dillon [Wed, 23 Jul 2008 16:39:34 +0000 (16:39 +0000)]
Synchronize some of the machine-independant AMD64 bits.

Obtained-from: Jordan Gordeev <jgordeev@dir.bg>

15 years agoUncomment reference.
Sascha Wildner [Wed, 23 Jul 2008 14:14:44 +0000 (14:14 +0000)]
Uncomment reference.

15 years agoRemove old comment.
Sascha Wildner [Wed, 23 Jul 2008 14:09:05 +0000 (14:09 +0000)]
Remove old comment.

15 years agoFix path for the package tools.
Sascha Wildner [Tue, 22 Jul 2008 15:42:34 +0000 (15:42 +0000)]
Fix path for the package tools.

Reported-by: Archimedes Gaviola <archimedes.gaviola@gmail.com>
15 years agoDon't let PROMISC interfere hardware vlan tagging operation. Enable hardware
Sepherosa Ziehau [Tue, 22 Jul 2008 12:08:41 +0000 (12:08 +0000)]
Don't let PROMISC interfere hardware vlan tagging operation.  Enable hardware
vlan tagging after this change.

15 years ago- Add bge_cksum_pad() to assist hardware csum offloading on runts
Sepherosa Ziehau [Tue, 22 Jul 2008 11:55:01 +0000 (11:55 +0000)]
- Add bge_cksum_pad() to assist hardware csum offloading on runts
  Obtained-from: NetBSD
- If bge_encap() fails, increase ifnet.if_oerrors

15 years agoAdd serializer assertion in all NIC driver interfaces
Sepherosa Ziehau [Tue, 22 Jul 2008 11:52:06 +0000 (11:52 +0000)]
Add serializer assertion in all NIC driver interfaces

15 years agoIncrease RX ticks to 100us
Sepherosa Ziehau [Tue, 22 Jul 2008 11:49:22 +0000 (11:49 +0000)]
Increase RX ticks to 100us

15 years agoAdd jmphy.c
Sepherosa Ziehau [Tue, 22 Jul 2008 11:37:14 +0000 (11:37 +0000)]
Add jmphy.c

15 years agoAdd driver which supports PHYs from JMicron
Sepherosa Ziehau [Tue, 22 Jul 2008 11:28:49 +0000 (11:28 +0000)]
Add driver which supports PHYs from JMicron

Obtained-from: FreeBSD (yongari@freebsd.org)

15 years agoregen
Sepherosa Ziehau [Tue, 22 Jul 2008 11:16:28 +0000 (11:16 +0000)]
regen

15 years agoAdd OUI for PHYs from JMircon
Sepherosa Ziehau [Tue, 22 Jul 2008 11:16:11 +0000 (11:16 +0000)]
Add OUI for PHYs from JMircon

15 years ago- Remove the callout and related bits in mii_layer; all of the ethernet
Sepherosa Ziehau [Tue, 22 Jul 2008 10:59:16 +0000 (10:59 +0000)]
- Remove the callout and related bits in mii_layer; all of the ethernet
  device drivers actually do mii_tick() in their own callout and
  mii_softc.mii_ticks serves the us quit well.  This makes all mii aware
  NIC drivers' miibus interface MP safe.
- Clear mii_softc.mii_ticks when change ifmedia.
- Clear mii_softc.mii_ticks if we have link.

15 years agoReference hammer(5).
Sascha Wildner [Tue, 22 Jul 2008 00:22:23 +0000 (00:22 +0000)]
Reference hammer(5).

15 years agoAdd missing section.
Sascha Wildner [Mon, 21 Jul 2008 23:42:23 +0000 (23:42 +0000)]
Add missing section.

15 years agoFix typo.
Sascha Wildner [Mon, 21 Jul 2008 23:42:02 +0000 (23:42 +0000)]
Fix typo.

15 years agoAdd note on more HAMMER features:
Thomas Nikolajsen [Mon, 21 Jul 2008 21:20:52 +0000 (21:20 +0000)]
Add note on more HAMMER features:
 - instant crash recovery
 - large file systems & multi volume

15 years agoFix compilation warning.
Nuno Antunes [Sun, 20 Jul 2008 18:43:12 +0000 (18:43 +0000)]
Fix compilation warning.

15 years agoFix prototypes and correct some other mistakes.
Sascha Wildner [Sat, 19 Jul 2008 23:53:36 +0000 (23:53 +0000)]
Fix prototypes and correct some other mistakes.

15 years agoChange 'default' to 'English'
Matthew Dillon [Sat, 19 Jul 2008 22:14:46 +0000 (22:14 +0000)]
Change 'default' to 'English'

15 years agoHAMMER Utilities: Sync with HAMMER 65.
Matthew Dillon [Sat, 19 Jul 2008 20:26:01 +0000 (20:26 +0000)]
HAMMER Utilities: Sync with HAMMER 65.

15 years agoHAMMER Utilities: Sync with HAMMER 65.
Matthew Dillon [Sat, 19 Jul 2008 18:48:15 +0000 (18:48 +0000)]
HAMMER Utilities: Sync with HAMMER 65.

* Simplified PFS directives.

* Bring the 'hammer blockmap' debugging dump up to date.

* hammer mirror-write no longer attempts to update the end-sync when it
  does not receive an end-synchronization command from the originator.

15 years agoHAMMER 65/Many: PFS cleanups and confusion removal
Matthew Dillon [Sat, 19 Jul 2008 18:44:49 +0000 (18:44 +0000)]
HAMMER 65/Many: PFS cleanups and confusion removal

* Simplify master/slave operation.  Remove the master=, slave, and no-mirror
  options from pfs-update.  Retain pfs-master, pfs-slave, pfs-upgrade, and
  pfs-downgrade for dealing with master and slave operation.

  Move the master= and nomirror specifications back to hammer_mount.  They
  have to be mount-wide anyhow, the current code does not support different
  master ID's on a PFS-by-PFS basis.

* Add some additional failsafes to the mount code.   The master id cannot
  be allowed to change by a mount update (-u).

* Fix a bug in hammer pfs-upgrade operation that could result in a livelock
  during the B-Tree iteration.

15 years agoFix last 'missing sentinel in function call' warning.
Sascha Wildner [Sat, 19 Jul 2008 13:50:51 +0000 (13:50 +0000)]
Fix last 'missing sentinel in function call' warning.

15 years agoRemove trailing whitespace.
Sascha Wildner [Sat, 19 Jul 2008 13:43:03 +0000 (13:43 +0000)]
Remove trailing whitespace.

15 years agoAdjust the path for HEAD to 2.0 for now. Once we have packages for 2.1 available,
Matthias Schmidt [Sat, 19 Jul 2008 12:29:59 +0000 (12:29 +0000)]
Adjust the path for HEAD to 2.0 for now.  Once we have packages for 2.1 available,
we can change it to 2.1

15 years agoHAMMER 64/Many: NFS, cross-device links, synctid
Matthew Dillon [Sat, 19 Jul 2008 04:49:39 +0000 (04:49 +0000)]
HAMMER 64/Many: NFS, cross-device links, synctid

* Check for cross-device links and cross-PFS links in the link and
  rename code.

* Update a directory's mtime when a file is created or deleted within it.
  (good idea anyway, also allows NFS clients to properly invalidate their
  directory caches).

* Only lock the PFS sync-end-tid field when the HAMMER_PFSD_SLAVE flag is
  not set.

* Clear ocp->dip->objid_cache when cleaning out the object cache.

* PFS softlinks in the form @@PFS%05d are auto-expanded by HAMMER's
  readlink() to include a snapshot transaction id.  Adjust getattr
  to properly set va_size (aka stat->st_size) to the length of the
  expanded version.  This fixes NFS confusion and allows PFS's to be
  mounted via their softlinks.

* Fix another issue where the synctid ioctl would still sometimes stall
  until the next filesystem sync.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
15 years agoO_CREAT was being allowed to leak through a read-only NFS export.
Matthew Dillon [Sat, 19 Jul 2008 04:43:33 +0000 (04:43 +0000)]
O_CREAT was being allowed to leak through a read-only NFS export.

15 years agoRemove outdated hammer.txt.
Sascha Wildner [Fri, 18 Jul 2008 23:29:24 +0000 (23:29 +0000)]
Remove outdated hammer.txt.

15 years agoFix message.
Sascha Wildner [Fri, 18 Jul 2008 23:23:21 +0000 (23:23 +0000)]
Fix message.

15 years ago* Add some lines about HAMMER mirroring which are based on a nice explanation
Sascha Wildner [Fri, 18 Jul 2008 22:54:52 +0000 (22:54 +0000)]
* Add some lines about HAMMER mirroring which are based on a nice explanation
  with examples sent to me by Michael Neumann <mneumann@ntecs.de>.

* Miscellaneous additions and fixes here and there.

15 years agoTry to make fwohci work more reliably. Stop printing 'phy int' to the
Matthew Dillon [Fri, 18 Jul 2008 03:51:28 +0000 (03:51 +0000)]
Try to make fwohci work more reliably.  Stop printing 'phy int' to the
console when it occurs.  Mask the interrupts which are not supported so
they do not reoccur.

There is still a problem with PHY resets... the bus does not always get
scanned after a reset.

15 years agoDetach the SIM when a firewire disk device is disconnected. Leave the
Matthew Dillon [Fri, 18 Jul 2008 03:49:13 +0000 (03:49 +0000)]
Detach the SIM when a firewire disk device is disconnected.  Leave the
code that supported reconnection commented out.

Fix an API violation in some of the code using SLISTs.

15 years agoSet count to a negative value for an initial burst.
Sascha Wildner [Fri, 18 Jul 2008 00:28:04 +0000 (00:28 +0000)]
Set count to a negative value for an initial burst.

15 years agoHAMMER 63/Many: IO Error handling features
Matthew Dillon [Fri, 18 Jul 2008 00:19:53 +0000 (00:19 +0000)]
HAMMER 63/Many: IO Error handling features

This commit removes all the remaining Debugger() calls and KKASSERTs in the
I/O error path.  Errors are now propagated up the call tree and properly
reported.

* Report I/O errors instead of asserting.

* Read or Write errors in the flush path disable flushing and force the mount
  into read-only mode.  Modified buffers are left locked in memory until
  umount to provide a consistent snapshot of the state of the filesystem.

  You must umount and remount to recover the filesystem.  The filesystem
  will automatically rollback to the last valid flush upon remounting.

* umount and umount -f are now able to unmount a HAMMER filesystem that has
  catastrophic write errors (e.g. pulling the USB cable on an external
  drive).

15 years agoWhen dealing with a failed read properly set B_INVAL.
Matthew Dillon [Fri, 18 Jul 2008 00:09:39 +0000 (00:09 +0000)]
When dealing with a failed read properly set B_INVAL.

15 years agoFix multiple bugs in CAM related devices which go away unexpectedly. This
Matthew Dillon [Fri, 18 Jul 2008 00:07:23 +0000 (00:07 +0000)]
Fix multiple bugs in CAM related devices which go away unexpectedly.  This
fixes numerous panics when pulling a USB mass media device in the midst of
heavy I/O.

* The SIM lock was being unlocked via the periph->sim path after periph
  was unheld.  periph can become free and blow up the unlock, so get
  the sim into a local variable first, then release periph.

* The code which waits for CCB completion needs to be a while loop, not
  an if.  It worked anyway, but wasn't very robust.

* Add CAM_SIM_DEREGISTERED to flag when a sim is undergoing deregistration.

* Beef up cam_dead_sim so it works more like a real sim.

* Properly install &cam_dead_sim in the device and periph structures
  related to a SCSI bus, when deregistering the bus.

* Disallow the addition of new devices when deregistering a bus.

* NULL out periph->softc when freeing it.

15 years agoMake some adjustments to the buffer cache:
Matthew Dillon [Fri, 18 Jul 2008 00:01:11 +0000 (00:01 +0000)]
Make some adjustments to the buffer cache:

* Retain B_ERROR instead of clearing it.

* Change B_ERROR's behavior.  It no longer causes the buffer to be
  invalidated on write.

* Change B_NOCACHE's behavior.  It no longer causes the buffer to be
  invalidated while the buffer is marked dirty.

* Code that was supposed to re-dirty a failed write buffer in brelse()
  was not running because biodone() cleared the fields brelse() was
  testing.  Move the code to biodone().

* When attempting to reflush B_DELWRI|B_ERROR'd buffers, sleep a tick
  to try to avoid a live-lock.

15 years agoGive krateprintf() an initial burst capability if count is set to
Matthew Dillon [Thu, 17 Jul 2008 23:56:23 +0000 (23:56 +0000)]
Give krateprintf() an initial burst capability if count is set to
a negative number like e.g. -5.

15 years agoCode documentation only: Describe B_NOCACHE
Matthew Dillon [Thu, 17 Jul 2008 23:55:24 +0000 (23:55 +0000)]
Code documentation only: Describe B_NOCACHE

15 years agoHAMMER can now be demand-loaded.
Thomas Nikolajsen [Thu, 17 Jul 2008 21:38:07 +0000 (21:38 +0000)]
HAMMER can now be demand-loaded.

15 years agoAdd missing space and newline to error message.
Thomas Nikolajsen [Thu, 17 Jul 2008 21:34:47 +0000 (21:34 +0000)]
Add missing space and newline to error message.

15 years agoStart describing snapshots.
Sascha Wildner [Thu, 17 Jul 2008 11:23:23 +0000 (11:23 +0000)]
Start describing snapshots.

15 years agoFix MODULES_WITH_WORLD build.
Sascha Wildner [Thu, 17 Jul 2008 10:11:58 +0000 (10:11 +0000)]
Fix MODULES_WITH_WORLD build.

15 years agoMinor corrections.
Sascha Wildner [Thu, 17 Jul 2008 09:41:19 +0000 (09:41 +0000)]
Minor corrections.

15 years agoHEAD is now 2.1, so reflect that change for the man pages as well.
Matthias Schmidt [Thu, 17 Jul 2008 09:24:00 +0000 (09:24 +0000)]
HEAD is now 2.1, so reflect that change for the man pages as well.

15 years agoIn DragonFly, gpt partitions look like slices in /dev, and we match the
Matthew Dillon [Thu, 17 Jul 2008 01:15:59 +0000 (01:15 +0000)]
In DragonFly, gpt partitions look like slices in /dev, and we match the
slice number to the GPT index to avoid confusion.

Fix the reporting of the slice in 'gpt add' (it was off by 1).

15 years agoMake HAMMER build and work as a module and extend hammer(5)'s SYNOPSIS
Sascha Wildner [Thu, 17 Jul 2008 00:16:14 +0000 (00:16 +0000)]
Make HAMMER build and work as a module and extend hammer(5)'s SYNOPSIS
accordingly.

15 years agoAdd a calendar.dragonfly file to remind us that on July 16, 2003, DragonFly
Sascha Wildner [Wed, 16 Jul 2008 23:09:04 +0000 (23:09 +0000)]
Add a calendar.dragonfly file to remind us that on July 16, 2003, DragonFly
was first announced, so the project just got 5 years old.

Noticed-by: Justin Sherrill <justin@shiningsilence.com> in his Digest
15 years agoAdd logic to warn of possible renames, and clearly state when failures may
Matthew Dillon [Wed, 16 Jul 2008 21:38:10 +0000 (21:38 +0000)]
Add logic to warn of possible renames, and clearly state when failures may
be due to prior renames.

Change -h to -a (-a for 'all'), which is a more obvious option name.

15 years agoAdd some examples and move some stuff around.
Sascha Wildner [Wed, 16 Jul 2008 20:39:28 +0000 (20:39 +0000)]
Add some examples and move some stuff around.

15 years agoAdd a pointer to hammer(5) and fix some minor issues.
Sascha Wildner [Wed, 16 Jul 2008 20:00:41 +0000 (20:00 +0000)]
Add a pointer to hammer(5) and fix some minor issues.

15 years agoHAMMER 62/Many: Stabilization, performance, and cleanup
Matthew Dillon [Wed, 16 Jul 2008 18:30:59 +0000 (18:30 +0000)]
HAMMER 62/Many: Stabilization, performance, and cleanup

* Fix 'hammer synctid'.  It was blocking until the next filesystem sync in
  some cases.  Also redo the flush sequencing for synctid so the inodes
  are flushed in large groups instead of individually, improving performance.

* Fix a case where reclaimed inodes were sometimes not being reclaimed on
  the backend in a timely fashion.  There are still some performance issues
  here.

* Fix a race in the buffer invalidation code that could cause an assertion.

* Remove a short-cut in hammer_checkspace() that was not taking into
  account reserved big-blocks and allowing operations to exhaust all
  free space on smaller medias and then assert, instead of returning ENOSPC.

* Clean up the flush_group append code by tracking the append point.

* Clean up documentation in the inode flush path.

* Allow the reblocker to dig deeper into available free space when run
  with a low fill level (<= 20%).