Zap cache_inode_weakref.

The use of weakrefs mad log-term reference simple, but came
added a couple of kinds of overhead.  Using ordinary FSAL
keys (augmented by exportid, see below) as dirent reference
removes a lookup table, and streamlines several code paths.

Thanks to Eldar Kleiner <eldark@infinidat.com> for the analysis.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Simplify cache_inode_new_entry slightly.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add emacs backup files to .gitignore

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Remove yet another (really old) copy of PyNFS

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Clean up scripts directory

Remove scripts to run test programs that no longer exist to test code
that no longer exists (such as the LRU list) as well as scripts for
the no-longer-in-existence Ganeshell.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Don't pay for a bunch of timechecks and not do anything

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Clean up and document the Thread Fridge

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Improve fridge initialization/destruction

Previously, the caller allocated a thread fridge, stuck some values in
it, and called the initialization function, which set some other
values in it.  Separate out a fridge parameters structure that gets
passed to the initializer.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Remove test_rpctools.c

It doesn't do anything useful, and it does it on an interface that
hasn't existed since last Spring.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Fix types

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Implment thr_max

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Un-camelcase flags

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Remove the stacksize parameter from the threadfridge

Nobody was using it, it wasn't even supported in the code, and it
breaks things if you try to set it.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Use clock_gettime rather than time in fridgethr

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
State machine for start, stop, and pause

Stop has been tested and works, pause may not work yet.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Implement new deferment styles for the thread fridge

 * Queue: What we had before, stick the job on a queue and immediately
          exit.

 * Block: Wait (with timeout) for a thread to become available.

 * Fail: Error on any submission when the fridge is full.

Switch request processing over to use blocking deferment.

A simple test (set the max to two, hammer it with three machines, and
insert prints on blocking and scheduling) shows that blocking
deferment works.  I'm not sure how to induce a timeout in request
processing, so as yet the behaviour of rearming the transport on
timeout isn't tested.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Rename fridgethr_get to fridgethr_submit

The name fridgethr_get did not make the function's purpose apparent.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Add per-task cleanup to thread fridge

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Fix up formatting of FSAL_UP

It was a rewrite anyway, so there's nothing we can foreport from 1.5.
It's not that busy an area in the code.
And I'm about to make lots of changes anyway by stuffing it in the fridge.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Put FSAL UPcall thread in the fridge

And if we find ourselves with lots of upcall traffic, we can trivially
increase the size of the fridge.

Also take the opportunity to simplify upcall dispatch and get rid of
the gigantic switch statements.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>