Enable delegations.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Check callback state during setclientid_confirm

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Changes related to delegations and delegation recalls.
  Delegate only if callback path is up.
  Do not recall if the path status is down, wait for next renew to tell
  the client about path state.
  Mark the path down if recall callback fails.
  renew will return NFS4ERR_CB_PATH_DOWN if the path state is down.
  callback path is established only during setclientid_confirm.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Added new data structs, prototypes, and delegation functions.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Add code to state_lock() to update stats.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Initialize delegation stats when creating new inode entry.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Add statfs support for any directory below the mount point.
Add an option to let the FSAL handle reclaims during grace period.
Add support for delegation conflict detection when adding new state entry.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Add delegation state removal and stats update in delegreturn.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Add support for removing delegation state during unlock.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Fix search for delegations in delegreturn. Fix second arg to state_del.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Fix owner added to delegation lock entries. Fix delegation stateid/seqid.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Add libblkid and libuuid

These will be used to get unique fsid for exported file systems

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
GPFS_FSAL Set exec flag on close.
Global export defaults must not indicate FSID was set

Also cleanup some logging.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Use fsid from file system if not configured for export

Also fix posix2fsal_fsid to convert dev_t minor and major to fsid minor
and major.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add open_dir_by_path_walk for safe implementation of lookup_path

FSAL lookup_path implementations (which are called to get the root
handle of an export at init time AND for v3 mounts of a sub-directory of
the export) are vulnerable to two attacks:

- First, if a symlink is in the path other than as the last element, the
old code does not reject the lookup.

- Second, and worse, the .. entry is not looked for...

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add CONF_*_TOKEN macros for scalar enum processing

log components needs array indexing too

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Replace use of tab_log_flag array with logfields struct

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