Fix malloc/jemalloc mixup due to missing dependencies in FSAL shared objects

FSAL shared objects were compiled without the -ljemalloc argument.
This has caused a crash in fs_specific_has() (FSAL_VFS) where strdup() memory was allocated by
jemalloc() but was free by libc's free()

Signed-off-by: Amit Dror <amitd@infinidat.com>
Adjust config samples files to current ganesha state

Fix VFS and POSIX config files to fit current ganesha install path.
Fix some config parameters' names in VFS config file

Signed-off-by: Amit Dror <amitd@infinidat.com>
Fix spelling in error messages

Signed-off-by: Amit Dror <amitd@infinidat.com>
Fixed verifier comparison in cache_inode_create_verify()

Signed-off-by: Amit Dror <amitd@infinidat.com>
Need to reference rpc and GNU features in os specific builds

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Clean up dirent handle management functions

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Abstract out dirent usage to make dir reading portable

Linux uses the low level api.  Freebsd has a different one.
One more level of redirection for directory entry reading and
decoding of the bytestream solves the problem.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Moved cache_inode_create_verify() to cache_inode_create.c

Signed-off-by: Amit Dror <amitd@infinidat.com>
Added cache_inode_create_set_verifier()

This function sets the mtime/atime attributes according to the create verifier
For use by both NFS3 and NFS4 code

Signed-off-by: Amit Dror <amitd@infinidat.com>
Use cache_inode_create_set_verifier() in open4_create()

Signed-off-by: Amit Dror <amitd@infinidat.com>
Fix attributes handling for UNCHECKED4 in open4_create()

In case of UNCHECKED4, in case the file already exists, cache_status was
prematurely set to CACHE_INODE_SUCCESS, causing the code that
clears the attribute except ATTR_SIZE to be skipped

Signed-off-by: Amit Dror <amitd@infinidat.com>
Fixes in NFS3 nfs_Create() flow

Fix handling of attributes for GUARDED and UNCHECKED modes
Added handling of verifier for EXCLUSIVE mode
Removed redundant call to cache_inode_lookup()

Signed-off-by: Amit Dror <amitd@infinidat.com>
cache_inode_lookup() to be called only after FSAL create op

In cache_inode_create(), try to create first, and only in case FSAL returns
ERR_FSAL_EXIST - perform cache_inode_lookup()

Signed-off-by: Amit Dror <amitd@infinidat.com>
In fs_specific_has(), properly initialize ret

Signed-off-by: Amit Dror <amitd@infinidat.com>
vfs: Cleanup fs_specific_has()

Mat fixed a bug at fs_specific_has(), but it was not finished and
I had a deeper cleanup of this function.

So sync with what I had in my tree. (And fix a bug)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Get rid of redundant hostaddr storage

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Hack USE_STAT_EXPORTER from autotools to work in cmake

Note:  This doesn't mean nfs_stat_exporter_thread.c will build.
It has been broken since pre-2.0-dev_7 because a lot has changed
 and is broken due to tirpc and drc changes.
Most of this is toast anyway post dbus stats anyway.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Add time interval functions for timespecs

Makes timer math easier.  Add test program for it.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Convert latency timers from timeval to timespec

timer_start is removed from worker_data because the only other place
it was used was the long processing thread which is now broken and
will be replaced as part of the thread fridge work.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Merge remote-tracking branch 'linuxbox2/next' into merge_next