New NFS4.2 support.
Fix algorithm that checks prime numbers

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Big commit to update the FSAL_LUSTRE tree

LUSTRE/pNFS: This commit implements the support of pNFS for FSAL_LUSTTRE
CHECKPATH: work done on FSAL_LUSTRE
FSAL_LUSTRE: portability feature, do not show <lustrre_root>/.lustre
With Lustre 2.4 and higher, this object starts to behace quiet weirdly.
FSAL_LUSTRE: Fix regression (parent dir badly managed via FID) observed
in lustre > 2.4
FSAL_LUSTRE: ported to LUSTRE 2.4 and 2.5
	adding fake file lustre_errno.h to allow compilation with Lustre 2.5
FSAL_SHOOK: missing pNFS vector
FSAL_LUSTRE: a few unused/unitialised variables fixed
build: fix build to handle non-standard installation directories

This patch handles non standard installation directories for
Lustre, Mooshika and IB libraries (librdmacm, libverbs), with the
following new variables:
- LUSTRE_PREFIX
- MOOSHIKA_PREFIX
- LIBRDMACM_PREFIX
- LIBIBVERBS_PREFIX

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
MAIN: redirecting stdout, stdin and stderr to /dev/null when server is daemonized by '-d' at startup.
In particular, holding a tty was a blocking issue in Clustered environment as ganesha was started via ssh (ssh did not return properly).
Log: update log header when server is daemonized.
FSAL_LUSTRE: Fix readlinks:
 - Change size from 1024 to PATH_MAX (coherent with the rest of the code)
 - readlink one less byte so we can't overflow when writing the final \0

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
9P: CID#23140, CID#23141: buffer overrun calling getpw{nam,uid}_r

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
9P: CID#23114: fix strncpy(.., .., strlen(..))

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
9P: CID#23116: lock: missing state_status assignment

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
9P: CID#23122: access2fsal converting readonly access improperly

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
9P/RDMA: Fix use of uninitialized variable

(+ add use of errno when msk_reg_mr fails)
Thanks to Grégoire Pichon (Bull) for this.

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
9P: getattr: use values instead of pointers.

Pointers cause copying garbage when the pointed value is a u32 used as a u64.

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
MAIN: use daemon() to daemonize the server if such a call exists. If not, do the job manually
Checkpatch on CmakeLists.txt
9P/RDMA: fix printf %p for maintainer mode happiness

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
Pull in new version of tirpc

This incorporates the fix to RPC_TIMEOUT handling in clnt_dg_call.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Port libtree commit 8cf49ec927e838675597d61b5f2eb56a2db16f05.

{avl,rb}tree_replace(): fixed swaped arguments to set_child() call

Signed-off-by: Raphael Manfredi <Raphael_Manfredi@pobox.com>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Fix type problem in fsal_check_access_no_acl and add more debug

mask MUST be of type fsal_accessflags_t, mode_t might not be big enough
for FSAL_[RWX]_OK flags (it isn't on FreeBSD).

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>

(cherry picked from commit 646fdd97b189a0654bb73d8cb1d296d0fd8f92af)

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

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