Make token_to_proc visible

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Integrate management of exportlist with export manager

Finish integration of export entry which is already embedded
in the gsh_export.

* Add state member to control initialization and removal

* remove redundant export_id from gsh_export and use export.id

* Add path, pseudo, and tag search functions with proper locking

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix nfs4_SetCompoundExport to use export.id

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Update BuildExportEntry to work with export manager

export list is now managed as part of gsh_export.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rewrite pseudo fs builder to use new safe export manager functions

foreach_gsh_export is the safe way to traverse the export list now.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rework NFS protocol functions to use save export lookup by path/tag

Note that proper usage also requires a 'put' of the export reference.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rewrite mnt_Export.c to use safe export scan function.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Update 9P protocol ops to use safe export lookup.

attach and auth pack away a reference to the export in the fid.
This is ref counted so clunk must put it back when it frees the fid
and auth must check for an old export and free it if necessary.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Remove old, unsafe export scan/lookup functions.

Also, the export list is now completely private to the export manager.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix some portability issues in posix2fsal_attributes().

"struct stat" differs (surprise!) on Linux and FreeBSD in naming certain member
variables. This commit accounts for them by putting platform specific code under
appropriate #ifdef blocks.

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>
(cherry picked from commit 5085059a71d9ea90580c28d8126c24f248e9dbe1)
Fix few strict mode compile warnings on FreeBSD platform

This commit fixes couple of "xxx may be used uninitialized" warnings seen with
following version.  gcc (GCC) 4.2.1 20070719

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>
(cherry picked from commit ce53baf6c0bad32996c8bf502d35d667d41794d5)
Limit the libcap interface usage to Linux platform.

libcap library is Linux specific. Any code/include files that reference to this
facility should only be compiled on Linux platform.

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>
Fix portability issue in check_convert_ipv6_to_ipv4().

Referencing shorthand variables other than s6_addr in 'struct in6_addr' is not
portable across platforms.

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>
Fix portability issue in get_raddr().

eferencing shorthand variables other than s6_addr in 'struct in6_addr' is not
portable across platforms.

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>
Make a credible opctx for the lock reaper.

For now, at least have good creds.

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

Conflicts:
	src/CMakeLists.txt

Kept commented out of libcap test rather than ifdef LINUX
because it still doesn't work right cross-platform

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

Signed-off-by: Jim Lieb <jlieb@panasas.com>
9P: remove reference to freed fid, and do it even on failure.
    Same for symlink (free structure in both code path)

(cherry picked from commit 4a7ad29e55bcd097825c171b6d317271f29b278e)
Signed-off-by: Jim Lieb <jlieb@panasas.com>
9P: close separately from cache_inode_dec_pin_ref, also clunk fid/close on 9p_remove

(cherry picked from commit 57baf46752f2571825c0666811b4d1605376d641)
Signed-off-by: Jim Lieb <jlieb@panasas.com>