Optimize IDMapper

Simplify code and remove a whole bunch of redundant copies.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Clean up uninitialized warning in dbus_message_entrypoint

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

The last patch didn't touch the cache, just the stuff that queried it.
This patch switches it around to use AVL trees.

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

Restore explicit spinlocks from original design.  This profiles
better (callgrind) than pthread mutex version.

Make req ctr just an atomic inc.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Inline the remaining XDR primitive type decoders (attr).

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Actually implement slot cache in CIH.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix two apparent (old?) bugs in CIH cache-hit path.

1. assoc check (if valid) must  ensure associated!=NULL
2. the above check also leaked refs (I think)

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix early return on entry == asssociated from cache_inode_get

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Silence some stats warnings at O2.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Do NFS4 OPEN_CONFIRM4 only for protocol 4.0

Ganesha was telling the client to do open confirm which is
not allowed in 4.1

Signed-off-by: Marc Eshel <eshel@us.ibm.com>
Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Signed-off-by: Jim Lieb <jlieb@panasas.com>
Update LRU protocol comment.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Merge remote-tracking branch 'linuxbox2/next' into cthon13_merge

Cthon 2013 Monday daily merge
Get rid of spurious major errors in filehandle checks

And clean up filehandle management a bit.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Introduce routines to manage thread credentials

fsal_save_ganesha_credentials should be called once to save
the Ganesha process's credentials.

fsal_set_credentials is called to set a thread's credentials
from the fsal_op_context_t.

Note that this sets fsuid, fsgid, and effective and filesystem
groups for Linux (Linux does not have separate egroups and fsgroups).

fsal_restore_ganesha_credentials is called to restore the
thread to Ganesha's process credentials.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>

Conflicts:

	src/FSAL/access_check.c
	src/include/FSAL/access_check.h
Fix USE_DBUS-OFF build problems

Not enough of the dbus interface was ifdef'd out...
This leaves the client manager and export manager infrastructure
untouched so it is available for other uses.

Note: stats are still gathered, you just can't get them out without
dbus.  Also, an ifdef in nfs4_Compound.c was just commented out.  This
is left as a marker until the old stats code has been removed.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Merge remote-tracking branch 'linuxbox2/next' into cthon13_merge
Merge remote-tracking branch 'ffilz/2.0-set-thread-creds' into cthon13_merge
Fix spurious cache miss in cache_inode_get

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Put the NFSv4 minor version into the request context

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix V4, V4.1 stats recording

Use req_ctx->nfs_minorvers to get the right proto stats area

Signed-off-by: Jim Lieb <jlieb@panasas.com>