NFSv3 - undo cut'n'paste errors in mknod and mkdir

nfs3_Mknod and nfs_Mkdir had lot of duplicate code added
during cache inode rewrite.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
NFS - once again restore the processing of FATTR4_TIME_*_SET

Modifying LastOffset without setting op_attr_success creates a discrepancy
between bitmap and the attribute values - some servers (Linux kernel NFSD
in particular) reject XDR calls which use such encoding to BADXDR error.

The change in 3dbb63a29579854d0b870a58d4df64bb9b35ee74 got lost
during inode cache rewrite.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
XFS FSAL - strict compile

How many times does one need to change the prototype
for check_quota to make it stick?

Signed-off-by: Max Matveev <makc@gmx.co.uk>
NFS - initialize user credentials properly

When dealing with requests which use AUTH_NONE make sure that
user_credentials are initialized properly: treat AUTH_NONE requests
as anonymous.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
NFSv3 - don't leak memory on read

If the offset in the read request is past the end of the file
or if there is an error then make sure that the buffer allocated
to receive the data is freed - post-op free does not free the
memory if read did not return any data.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
NFSv4 - respect array boundaries in bitmap4

The caller of nfs4_list_to_bitmap4() sets the bitmap size
to the maximum value: make sure we respect this value.

In the ideal world nfs4_list_to_bitmap4 would return
an error if it cannot convert the list to bitmap because
the array provided by the caller is too small but nobody is
checking the return value now, so just print a whiny messages
and hope it will get noticed - it's better then crapping over
someone's stack anyway.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
NFSv4 - really respect array boundaries in bitmap4

Several functions calling nfs4_list_to_bitmap4() were
allocating memory and forgetting to free it or allocating
memory and forgetting to set the length of the buffer they've
allocated.

The cut'n'paste made this worse by spreading the code
into multiple locations, so factor out processing of 'supported attributes'
bitmap and filling the results and make sure they're used everywhere.

Also change prototype for nfs4_list_to_bitmap4() - it does not return
the counter of attributes in the list therefore it does not need
a pointer.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Pull up lib(n)tirpc commit to:

TIRPC_COMMIT='d6a2ee55ceb6b45abd1bf379172ba78d13eb5478'

Fixes UDP service registration (port was 0).

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Return NFS4_OK from  Fattr4_To_FSAL_attr if nothing was
requested.

This hotfixes an issue with 3.4.2-4.fc17 (at least).

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix FD leak for /etc/mtab.
The file was opened for every export but was never closed.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
replace stat64 with stat in all gpfs functions.
  Also, do not allow ganesha to be started multiple times.
Add a direct unlink call that we not open the file and will return
the attributes of the directory on the same call.
direct create
fix a problem with the open call.  when creating, specify mode.
required progress check had reverse logic.
fix the incorrect long processing messages.