FSAL_LUSTRE: change readlink to handle up to PATH_MAX instead of PATH_MAX-1

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Fix build of PROXY handle mapping

Multiple symbols got lost since cmake port...

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix compile errors in fsal proxy handle db

Clean compile but I don't trust the code.  needs
rework of hashtable stuff.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix coverity defects.
Add emergency_cleanup FSAL method

This function will be called if the orderly shutdown proves to be less
orderly than initially hoped.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Acked-by: Jim Lieb <jlieb@panasas.com>
Call emergency_cleanup from shutdown on error

If one of the shutdown steps fails, flag the error and call
emergency_cleanup instead of the more proper shutdown.

Since Frank's work on unexport will provide the underlying support for
state and cache_inode deconstruction, the other half (replacing most of
the code in cache_inode_destroyer) will wait until that is done.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Acked-by: Jim Lieb <jlieb@panasas.com>
Reorder library order

We broke it when removing old config file parse code

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

Used to rescan partial lists

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Checkpatch and translation cleanup of parser

Change token names to english.  Reformat parser/lexer files to
checkpatch style.

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

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

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

Fixes BZ #1046557

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Probe sqlite3 for PROXY handle mapping

Disable handle mapping if sqlite3 is not present

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

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Removes weakref
pNFS/LUSTRE: invalidate attrs on close (force DS/MDS coherency). Think about something more subtle.
SQUASH ME
This commit adds the "manage gids" feature, in a similar way as what the knfsd does.

With this commit, the server will query am external group list provider
to know what are the alt groups (or secondary groups).

When used with AUTH_SYS:
The server will then trust what getgrouplist() tells and won't trust altgroups
provided in AUTH_SYS creds. The server will then manage all the gids by himself.
Interesting consequence is a better centralization of groups management.
At the same time, this breaks the 16 altgroup array size in the AUTH_SYS credentials which lead to EPERM.
If the server uses the feature introduced by this commit, user can belong to more than 16 groups.
All groups will be considered. None will be forgotten as it occurred with standard AUTH_SYS.

When use with RPCSEC_GSS:
the credentials carry a principal. This principal is converted but a (uid,gid) pair, but
altgroups will remain empty. Using Manage_Gids will populate altgroups by querying getgrouplist().

This commit reuse deprecated EXPORT_OPTION_USE_PNFS flag
Result of getgroup() are kept in a cache (in fact a AVL tree).
Information stored in cache expires and are regularily renewed. Expiration is tunable.

This commit add two configuration items:
	- a boolean "Manage_Gids" (default = FALSE), which is a per-export option
	- an integer "Manage_Gids_Expiration" (default = 30), which is a global parameter in NFS_Core_Param block.

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>