Restore missing bit for GROUP in FSALattr

Fattr4_To_FSAL_attr forgot to set GROUP bit in the attribute
mask - that tripped NFSv3 which was complaining about 'missing'
attributes.

Also make the message in nfs3_FSALattr_To_Fattr slightly more
useful by including the bits which were missing.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Push caller credentials into FSAL methods

Proxy FSAL needs caller credentials to send over to the
backend server. Unfortunately this requires modification
of FSAL API to push req_op_context from the protocol handlers
via inode cache and into FSAL.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Properly process attributes for special files

When calling functions which create files/directories/links etc
make sure the attributes include correct bits in the mask - caller
does not know which fields are valid without the mask.

And when processing replies use correct sizes for rawdev attributes:
specdata1 and specdata2 are 32 bit integers on NFSv4.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
PROXY FSAL - add support for special files

Implement mknode properly - this is very similar to mkdir,
just need to use right object type and make sure device major/minor
is specified.

When creating FIFOs and SOCKs specdata is set in the arguments but
is not used in encoding.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Merge remote-tracking branch 'linuxbox2/next' into merge_next
Remove dead code in nfs_worker_thread

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rework nfs4 attribute to fsal attribute processing

Remove huge switch statement and by-hand xdr encode/decode.  This is
now table driven off of fattr4tab entries and their companion encode/decode
functions.  These functions directly use the XDR translation library.

* Server time for timeset now uses system nanosec resolution

* much tighter error checking

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Add loading of librt for Linux builds

The clock_gettime() library call used by the decode_time XDR helper
needs this GLIBC call.  Add librt (where it lives)

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rework callers of nfs4_FSALattr_To_Fattr to drop pexport arg

This arg is already in data.  Drop it as redundant.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rework PROXY fsal calls to nfs4_FSALattr_To_Fattr

Change args to drop the redundant pexport.

File handle arg used to point directly into the xdr stream (no copy).
This is not safe because it needs to be aligned and xdr doesn't provide
a semantic for zero copy (yet).  So play it safe

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Rework pseudo handle and extended attributes attr processing

Now that the big switch is gone in nfs_proto_tools.c, use its
call here and eliminate their big switch statements.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix merge of new attributes change and expanded api context

cache_inode_statfs needs the req_ctx argument.
nfs_FhandleToCache gets ctx arg.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix new api context merge.

It forgot the NLM functions.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix merge missing piece in PROXY

Attributes call changed.  Merge didn't get it right.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Update POSIX fsal to new rev of api to use req_op_context

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Dead code removal post- attribute rework

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix Lustre fsal build issue

Remnant from old api breaks builds on newly cleaned workspace

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Port and enable NFSv4 ACLs in new api

* Fix attributes references inside _USE_NFS4_ACL blocks

* Make typing for uid/gid agree and use stdlib typedefs.

* Cleanup XDR encode/decode for acls.

* Fix some other outsized defs in acl structures.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Update CEPH methods to expanded api for req context

Missed in first pass to expanded ops ctx

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Update LUSTRE methods to expanded new api for ops context

Missed in initial expansion patch

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