Hush error from nonexistent /etc/system-release

This check is allowed to fail (and expected to on non-RedHat derived
systems).

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Fix warning in SQLite test

This was just caused by a malformed block, the condition on the 'endif'
didn't match the condition on the 'if'.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
NFS4.2 fallocate support.
Merge remote-tracking branch 'ganltc/ibm_next_20' into merge_next

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

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix compile error for option turned off in LUSTRE export.c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Silence unused error in LUSTRE mds.c

Incomplete code

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Deprecate USE_PNFS bit and keyword in exports

Removed bit to make room for an already full export_perms.options

split out from commit 886a2e5050e593a009c60410b860c1b9cce126e1

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Adds the "manage gids" feature.

The server will query an 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.

A refcounter is used to avoid changing and freeing a grouplist
when it is currently in use by another thread.

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

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

(cherry picked from commit 886a2e5050e593a009c60410b860c1b9cce126e1)

Commit was split to make deprecate of pnfs flag in options separate
See commit 4ad7789a69343208518c581e46486ee226c4f559 for the rest of the
original change.

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

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix acl support bits for GPFS FSAL.

Ganesha1.5 reported that it supports both 'ALLOW' and 'DENY' ace types.
The current code depends on an FSAL call, and many FSALs report that they
only support 'ALLOW' ace type! Due to a bug or a feature, Linux NFS
client supports NFS4 ACLs with a server if and only if the server
supports both 'ALLOW' and 'DENY' type ACEs. This means that Linux NFS
client doesn't support any form of NFS4 ACLs with Ganesha2.1 server.
GPFS indeed supports both 'ALLOW' and 'DENY' types, and this patch fixes
reporting both 'ALLOW' and 'DENY' bits.

Signed-off-by: Malahal Naineni  <malahal@linux.vnet.ibm.com>
Signed-off-by: Marc Eshel <eshel@us.ibm.com>
Detect errors on nfs_rpc_dispatch_call

If clnt_call returns something other than success, pass RPC_CALL_ABORT
to the completion hook rather than RPC_CALL_COMPLETE.

Also pull up to libntirpc to signal timeout and not timeout spuriously.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Add an option to override the ALLOCATOR.
Fill in the export_perm and then pass it to get_req_uid_gid

Manage_Gids option works with NFSv3 but fails with NFSv4. We need to
call nfs_export_check_access() first to fill in the export_perm, and
then call get_req_uid_gid().
Don't ignore client stable option on write. (also for 2.0)
Bump tirpc to include Rong Zeng's GSS patch

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Merge remote-tracking branch 'linuxbox2/next' into merge_next

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

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix PT compile errors and some PT clean up

(cherry picked from commit d5202723fa7f4d7c7abca450d3f34c89aed184e6)

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix strict compile errors in FSAL_PT

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

(cherry picked from commit b26589fa81dd51c73dcfd3e2f638cad8c35f5263)

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