Date | Commit message (Collapse) |
|
This reduces unnecessary boilerplate due to switching khash.
|
|
There are no apparent benefits at the moment, but theoretically
it can reduce the amount of allocations we do and improve locality.
|
|
This should avoid concurrency bugs where client may run in
multiple threads if we switch to multi-threaded graceful shutdown.
|
|
Users reducing or increasing thread counts should increase
ioq capacity, otherwise there's no point in having more or
less threads if they are synched to the ioq capacity.
|
|
This will allow us to limit concurrency on a per-device basis with
limited impact on HTTP header reading/parsing. This prevents
pathological slowness on a single device from bringing down an entire
host. This also allows users to more safely run with fewer aio_threads
(e.g. 1:1 thread:device mapping) on fast devices with smaller low-level
(kernel/hardware) I/O queues.
|
|
This replaces the fsck_queue internals with a generic
ioq implementation which is based on the MogileFS devid,
and not the operating system devid.
|
|
We will have structures inside the dev struct accessed by multiple
threads frequently, so keep it cache-aligned.
To reduce memory usage for large-numbered devices, avoid storing the
prefix on output and instead just rely on the printf-family of
routines to generate stringified output in uncommon code paths.
|
|
This will allow us to lookup devices for per-(mog)device I/O queues.
|
|
If the mogstored sidechannel is inactive (in HTTP-only mode), we should
still count the number of devices correctly to correctly scale the
number of worker threads.
|
|
gnulib did it for us in m4/gnulib-cache.m4, we'll match.
|
|
If a filesystem error occurs when close()-ing the usage file,
ensure we log the error for debugging (and hope syslog writes to
a different device!).
|
|
The "long double" data type is present in C89 and may offer
more precision than plain double on modern compilers. This
change is unlikely to be noticeable right now, but may help
some very large machines in the (far) future.
|
|
Under FreeBSD 9.0, fstatvfs() on a ZFS filesystem will return
the smallest fragment size ZFS supports (512). Using integer
arithmetic, dividing 512 by 1024 will result in zero. Thus, the
easiest way to preserve the fractional component is to resort
to floating point arithmetic: f_frsize / 1024.0
The division must happen first to minimize the possibility
of overflow.
|
|
dprintf() may return a non-negative value and still set ENOSPC
on partially-written data.
|
|
Opening a usage file for writing can hit the FD limit, so
ensure we retry on EMFILE/ENFILE/ENOMEM errors.
This also improves diagnostics for failures of individual
function calls.
|
|
No point in using goto to just jump to the next statement,
and need to trigger assert() on EBADF
|
|
We don't want files to be globally readable/writable
when writing is in-progress.
|
|
This gives necessary flexibility in choosing open(2) flags (for
Content-Range: uploads) without further complicating things.
|
|
Nuked old history since it was missing copyright/GPLv3 notices.
|