Generate the address string in get_gsh_client

We use the string all the time. generate it once
In the process, move these references into the req_ctx

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Add remove function to export manager

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Add a front end cache to client manager avl tree

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Merge NEEDS_EXPORT etc. bits for rpc_export handling

copied from 0ec8470462

Signed-off-by: Jim Lieb <jlieb@panasas.com>
ANSI'fy the protocol ops vector initializations

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Clean up redundant code in rpc_execute

Flatten the big switch and eliminate extra code and vars.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix rpc dispatch and execute to separate op validate steps

Separate the checking of a valid rpc call which is svc layer
and the selection of op descriptor.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Remove MDONLY test in v3 read/write.

Now done at dispatch level.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Remove security checks from NFS4 ops

Remove calls to nfs_export_check_security, that will be handled when a
handle is instantiated by PUTFH, PUTROORFH, PUTPUBFH, LOOKUP, LOOKUPP,
OPEN, CREATE, etc.

Remove calls to nfs4_Is_Fh_Pseudo, the pseudo file system is
explicitly MD READ ONLY and has no REGULAR files so none of these
operations will succeed.

However, RENAME and LINK do need to check savedFH to see if IT is in
pseudo file system.

hand merged from 595c8280126046c

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Add another event to clear just blocked locks when grace period starts.
Update GPFS FSAL to use new async interface for up-calls
Enable building of GPFS rpms and add appropriate sections to cmake.
Also, clean up the default configuration file which has a lot of
parameters that are not supported anymore.
Pull out FSAL_UP directory from CMakeLists.txt

Thanks to Rong Zeng for catching this.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Remove unused MntPath from compound data

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Remove data->fullexportlist and use nfs_param.pexportlist

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Add routine to set_compound_data_for_pseudo

This routine fills in compound data fields when a pseudo fs handle is
made currentFH:

data->current_entry
data->current_filetype
data->pexport
data->export_perms.options

Also clean up some return code issues in Protocols/NFS/nfs4_pseudo.c
and remove some unecessary casts to make finding code that affects
currentFH easier.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>

manual merge from 30fbc660f3e

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

Make nfs4_MakeCred check export perms

PUTFH is now the only consumer of nfs4_SetCompoundExport. PUTFH should
always call nfs4_SetCompoundExport when putting a non-pseudo fs handle
into currentFH.

nfs4_MakeCred now checks all the per export permissions other than
READ, WRITE, MD_WRITE, and MD_READ.

Originally from 25564ea609ce.  Handle mgmt & ops consolidated elsewhere

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Jim Lieb <jlieb@panasas.com>
Convert exportlist to glist

All the exportlist loops are now glist_foreach
Helper functions hide the other stuff

Manual merge from 8ff375beba46 and friends

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Change export options to export perms

Consolidate into own struct for better export permission
checking.

All of this is a separate structure so it can be easily
passed to other contexts from the export itself (clients and such)

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Save cache entry pointer for each export root instead of using cache_inode_make_root

nfs_export_create_root_entry doesn't need the attributes
from cache_inode_get so we allow cache_inode_get to skip
returning attributes when they aren't asked for.

This will also, make nested exports, such as:

/ibm/fs0
/ibm/fs0/export1

Not mess things up. In the old code, export1 would have been turned into
a root cache inode, and a LOOKUPP from it would not go to fs0, even if
the client had mounted /ibm/fs0.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>

manual merge from a5c85466f70d

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