Checking in changes prior to tagging of version 2.67.

Changelog diff is:

diff --git a/CHANGES b/CHANGES
index bd7e38a..f0f578c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,36 @@
+2013-02-02: Release version 2.67
+
+   * Serialize tempfile reaping (dormando <dormando@rydia.net>)
+
+   * reaper: ensure worker can be stopped via "!want" (Eric Wong <normalperson@yhbt.net>)
+
+   * domain removal also removes its default class (Eric Wong <normalperson@yhbt.net>)
+
+   * store: wrap create_class in a transaction to avoid races (Eric Wong <normalperson@yhbt.net>)
+
+   * mogstored: fix kqueue usage with daemonization (Eric Wong <normalperson@yhbt.net>)
+
+   * Filter the devices before we do an expensive sort. (Dave Lambley <davel@state51.co.uk>)
+
+   * httpfile: avoid killing worker on down sidechannel (Eric Wong <normalperson@yhbt.net>)
+
+   * move checksum and tempfile delete to delete worker (Eric Wong <normalperson@yhbt.net>)
+
+   * sqlite: use immediate transactions to prevent busy errors (Eric Wong <normalperson@yhbt.net>)
+
+   * disable Nagle's algorithm for accepted clients (Eric Wong <normalperson@yhbt.net>)
+
+   * ProcManager: favor using recently-used queryworkers (Eric Wong <normalperson@yhbt.net>)
+
+   * Do both sorts in one method, to save on shared initialisation. (Dave Lambley <davel@state51.co.uk>)
+
+   * Pull out device sorting into it's own method for overriding. (Dave Lambley <davel@state51.co.uk>)
+
+   * Reseed the random number generator after forking. (Dave Lambley <davel@state51.co.uk>)
+
+   * support nginx server type in mogstored command line options (Daniel Frett <daniel.frett@ccci.org>)
+     (also Gernot Vormayr <notti@gbcc.at>, others)
+
 2013-01-06: Release version 2.66

    * add a hook to cmd_updateclass (Daniel Frett <daniel.frett@ccci.org>)
list_keys: consistent ESCAPE usage across DB types

Without specifying an ESCAPE character for LIKE queries, the '\'
we use for escaping is treated as a literal and improperly
matched keys with '\' in them under SQLite.

This is only needed for SQLite, as the SQLite language reference
makes no reference of a default ESCAPE character in
http://www.sqlite.org/lang_expr.html

ESCAPE is supported in MySQL and Postgres, too; and defaults to
'\'.  We specify it anyways to reduce code differences between
different databases.

Tested on MySQL 5.1.66 and Postgres 8.4.13 on Debian 6.0
and SQLite 3.7.13 on Debian 7.0
list_keys: escape in Store, allow [%\\] as prefix

If we support non-SQL DBs in the future, escaping rules could
become store-specific, so Worker/Query is not the right place for
it.

Since '%' and '\' may be escaped just like any other character,
we may also allow these characters as prefixes by properly
escaping them.

Tested on MySQL 5.1.66 and Postgres 8.4.13 on Debian 6.0
and SQLite 3.7.13 on Debian 7.0
Tell the kernel we're doing sequential reads.

[ew: squashed Dave's change to make IO::AIO optional]

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Don't emit warnings if we're lacking the space free of a device.  If we don't
find space on devices with known space free, try the unknowns.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
ProcManager: only log times_out_of_qworkers for new queries

Logging times_out_of_qworkers in ProcessQueues is not accurate:
recently-idle queryworkers may not be noticed and marked idle while
ProcessQueues is looping and draining the @IdleQueryWorkers pool.

Instead, only log times_out_of_qworkers when new requests are
enqueued.
Merge remote-tracking branch 'bogomips/list_keys' into next-small

* bogomips/list_keys:
  list_keys: escape in Store, allow [%\\] as prefix
  list_keys: consistent ESCAPE usage across DB types
Merge remote-tracking branch 'bogomips/pending_queries' into next-small

* bogomips/pending_queries:
  ProcManager: only log times_out_of_qworkers for new queries
mogstored: avoid bareword on IO::AIO w/o fadvise

IO::AIO 2.4 on Debian stable lacks IO::AIO::FADV_SEQUENTIAL
constant, causing compilation to fail on the bareword.
Accessing the constant as a subroutine call (via "()") avoids
the bareword and defers the error to runtime (which is trapped
by eval).

Tested under IO::AIO 2.4 on Debian stable and IO::AIO 4.15 on
Debian testing (verified fadvise64() syscall under strace).
httpfile: correct FILE_MISSING check in digest_mgmt

This is unlikely to be an issue in fsck, fsck checks
file size/existence before digesting the file.
httpfile: correct timeouts for sidechannel digest

fsck digests are deprioritized and serialized in mogstored, so
it's nearly impossible to tell what's in the queue before our
request.  Since fsck is not latency critical, extend the timeout
for that.

We also need to account for normal seek/network latency for
non-fsck digest requests, so add node_timeout to that.

These bugs were mostly hidden since we are relying on <> to
read, which may incur watchdog timeouts.
fix "drain" handling used by MultipleHosts replpolicy

MogileFS::DeviceState was never updated for the 2.40 drain changes.
The broken-since-2.40 should_have_files sub caused
ReplicationPolicy::MultipleHosts to overreplicate files, as it
was not counting drain devices in the total disks check.

Thanks to Tim on for reporting this to the mailing list at
mogile@googlegroups.com