9P: fixes bug #1125830 and make it possible to mount sub-directory via 9p

This bug makes it possible for 9p to mount a sub-directory of an exported directory.
For example, if "/foo" is exported, you now can mount "/foo/bar".
It fixes bug #1125830 too by returning correct error when trying to mount non-existing
directories or non-accessible directories.
The TATTACH message now works like the MOUNTPROC3_MOUONT RPC Call.

Change-Id: I92594dca93dc8e44dfc2f05f28329014d76df4d5
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
FSAL_ZFS: make FSAL_ZFS compliant with new config parsing.

Change-Id: I227d7269ce5504a2519d1e2cb8a7fa2f8f79f358
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
FSAL_LUSTRE: Fix implicit function declarations

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Port to Lustre 2.6, is compatible with Lustre 2.1, 2.4 and 2.5

FSAL_LUSTRE is accessing LUSTRE via the "fid path" way. Every accessed object is associated with a fid (similar to a NFS FH in some ways).
For every object, a special and immutable path can be build to access the object. This path is "<mount point>/.lustre/fids/<object's fid>".
When trying to lookup parent from <mntpoint>/.lustre/fid the standard POSIX API points to <mntpoint>/.lustre/fid, making this special
directory the parent of every object.
To deal with that, FSAL_LUSTRE embeds a very small piece of Lustre kernel code to compute the paren correctly with proper consideration
of the filestsyem trees. The related code is located in src/FSAL/FSAL_LUSTRE/lustre_extended_types.h .
From version 2.4 to 2.6, the required code to embed has change, but with backward compatibilty.
This commits updates the embedded piece of code and makes it compatible with very version of Lustre 2.x from 2.1 to 2.6 .

Change-Id: I8680d27cbf155f6e0c5b3115fb1b276742fb4aed
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
FSAL_LUSTRE: fixes badly formatted comments in src/FSAL/FSAL_LUSTRE/lustre_extended_types.h . No impact.

Change-Id: Ia0d1c4859a260e4183f25a6b7c7e1fff50dc012d
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
FSAL_LUSTRE: builds FSAL_SHOOK with name "SHOOK"

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
RPM: makes rpmbuild aware of libganesha_trace.so for LTTng

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
Merge remote-tracking branch 'martinetd/next' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
V2.2-dev-7

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add and update NFSv4.2 ops based on draft 26
Merge remote-tracking branch 'marc/new42' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
V2.2-dev-8

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID 72601: remove dead code.
cmake: allow the FSAL_DESTINATION to be overwritten

In certain environments, the library pathes are no longer
lib, lib32, and lib64 - such as Debian based systems that support
multiarch where the library path for the 64-bit architectures
are actually /usr/lib/x86_64-linux-gnu/ganesha and use the gnu
tuple based definition for the library.

So, to maintain backwards compatibility just allow an
override to cmake that can install the FSAL modules into
a different location.

Usage:

$ cmake -DFSAL_DESTINATION=lib/x86_64-linux-gnu/ganesha

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
cmake: use the environment DESTDIR override for python installs

In several packaging steps, the DESTDIR is specified to install
the results to a local directory without changing the prefix
of the compilation.

So, in this case use the DESTDIR for the python installation
command to avoid any attempts to install to the root "/usr"
path when doing package installs.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
cmake: add a debian cmake build configuration

In the long run, the cmake packager can be used to create the debian
package by adding all of the appropriate glue definitions into this
file.

In the short term, this configuration is just referenced from
the debian/rules to trampoline from a "git-buildpackage" or a
"dpkg-buildpackage" command into the debian specific build
configuration.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
debian: update the debian configuration for packaging

Update to a 2.1.0 package and remove the specific 1.5.0 patches.

Rough cut, can easily be refined from here

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
fsal-proxy: implement the status() of FSAL API

Now is_open() depends on the status() API to get open flags, so we need a
proper pxy_status().  Otherwise, cache_inode_rdwr_plus() will loop forever as
the default status() returns FSAL_O_CLOSED.

Signed-off-by: Ming Chen <mchen@cs.stonybrook.edu>
fsal-proxy: fix NFS4ERR_BAD_SEQID in pxy_create()

As ffilz pointed out long time ago in
http://sourceforge.net/p/nfs-ganesha/mailman/message/30876823,
pxy_create() mistakes stateid->seqid for open owner seqid and causes
NFS4ERR_BAD_SEQID errors.

This patch maintains an open owner seqid in the client side (proxy FSAL in this
case), and increments the open owner seqid upon state mutating operations
(OPEN, OPEN_CONFIRM, and CLOSE).

Signed-off-by: Ming Chen <mchen@cs.stonybrook.edu>
uid2grp: make it static like other support libs

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>