Remove two pool constructors that just zero memory

pool_alloc by default zeroes memory, no need to duplicate.

constructor_nfs_request_data_t was showing as a significant
function in some gprof runs and is pointless. Also get rid of
constructor_request_data_t.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Minor log clean up

Remove a duplicate function (macro actually).

When changing all log levels by -N or by setting COMPONENT_ALL from
environment or SNMP, ignore the components that have special purpose.

Read the environment for COMPONENT_XYZ variables after processing
the -N and -L command line options.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add config block for log

Var names are the log component name (such as COMPONENT_FSAL).
The COMPONENT_ part is optional. COMPONENT_ is still required
in the environment.

Var values are the log levels (such as NIV_DEBUG). The NIV_
part is optional (and is now optional for environment and
SNMP set values.

Ignore case for components and level values (except component
must still be in all caps in environment).

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Convert latency stats to msec and use clock_gettime

msec is plenty of granularity for latency statistics.

clock_gettime (which is Linux specific) using the CLOCK_MONOTONIC_COARSE
timer avoids making a system call so it should be much more efficient
for statistics collection.

by having the timer value be an int64_t count of msec since epoch
begin, it becomes something that can be atomically stored and fetched
which eliminates a mutex protecting long running thread detection.
Also, the atomic will be compiled out if stat exporter is not used.

Also reduce calls to nfs_stat_update

Also, since preqnfs->time_queued is not currently set or used,
ifdef out all code related to queue wait time.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Compile out stats only used by stat exporter thread if not configured

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Fix up min/max stats calc and move avg to script

Min/Max must only be accumulated from worker threads that
have at least one request processed of the type.

Average latency is easily calculated by the processing script.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add fsal_op_context_t to FSAL_read

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add fsal_op_context_t to FSAL_readdir

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add fsal_op_context_t to FSAL_commit

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add fsal_op_context_t to FSAL_close, FSAL_closedir, FSAL_close_by_fileid, cache_inode_close

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add latency and call count to fsal_op_context_t

Accumulate time spent in FSAL operations inside latency
field in fsal_op_context_t.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add FSAL latency tracking per NFS request

Currently this is only tracked for v3 requests

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

Conflicts:

	src/MainNFSD/nfs_stat_exporter_thread.c
	src/MainNFSD/nfs_stats_thread.c
	src/include/nfs_core.h
	src/include/nfs_stat.h
	src/support/nfs_stat_mgmt.c
	src/tools/ganestat.pl
Fix showmount -e for MATCH_ANY_CLIENT

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Only call LogClientListEntry if isFullDebug

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