Use __thread instead of pthread_get_specific in logging code

Convert the thread-specific data to thread local storage,
so we eliminate the expensive pthread_[get|set]specific code.

This also eliminates the need for the emergency_context because
we can static initialize the thread local storage.

Also, trim maximum thread name, and make it static so we aren't
dynamically allocating it.

Signed-off-by: Poornima Gupte <poornima.gupte@in.ibm.com>
Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Additional clid str changes for nfs4 recovery directory

1. Need to skip bad entry in v4recov/v4old to avoid infinite loop.
2. Need to closedir after processing the subdir.

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Revert ntirpc update error in dev_15

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity fix: Missing unlocks in log/log_functions.c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 23418: Use of uninitialized pointer in dbus/properties_handle.c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Move static vars into parser_state

Missed these in earlier pure parser work.  These vars are now in
parser_state.  Where they were before was not thread safe nor was
the parser properly reentrant...

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rename src/ConfigParsing to src/config_parsing

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rename nlm_list.h to ganesha_list.h

It's about time.  It escaped the bounds of the NLM code a long time ago.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Move client_mgr.c from Protocols to support.

Makes more sense here.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 23127  Fix null reference after test

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 18507: Fixed deref of NULL before null check in delayed_exec.c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 18461: Double lock in fridgethr_submit

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 18462: Program hangs in fridgethr_sync_command

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 23113: Buffer not terminated in admin_dbus_grace

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 23930-23943: Uninitialized scalars in nfs_proto_tools.c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 23960:  Macro compares unsigned to 0 in config_parsing.c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 23966: Resource leaks in conf_lex.l

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 24084: Logically dead code in log/display.c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 24076: Fix dereference before NULL check in nfs3_mknod

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Coverity 18440: Unchecked return in idmapper_clear_cache

Also conforms to checkpatch.

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