Initialize attrlist in FSAL_PROXY.

This fixes a segmentation fault because of unitialized attrlist.

Signed-off-by: Ming Chen <v.mingchen@gmail.com>
Signed-off-by: Max Matveev <makc@gmx.co.uk>
Fix symbols resolution of RPC functions.

Otherwise, the RPC symbols used will come from libc the library, instead of the
libntirpc submodule.

For this patch to work properly, we need to build the libntirpc with the -fPIC
flag.

See detailed discussion at
http://sourceforge.net/mailarchive/message.php?msg_id=30740546

and

http://sourceforge.net/mailarchive/message.php?msg_id=30740656

Matt's comments:

	I'm not certain whether this should be needed.

	These symbols weren't properly redirected, and our new commits (in ntirpc
	as well as Ganesha) do that.

	If proxy loads and run with our commits only, then we shouldn't need to
	change the linkage of fsal_proxy.so.

Signed-off-by: Ming Chen <v.mingchen@gmail.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix pxy_fsalattr_to_fattr4 of FSAL_PROXY.

Use the fattr_bit field of struct fsal_mask2bit instead of mask.

Signed-off-by: Ming Chen <v.mingchen@gmail.com>
Fix a NFS4ERR_BAD_SEQID problem of FSAL_PROXY.

No sure if it is a good way to always use seqid 0 here in
COMPOUNDV4_ARG_ADD_OP_OPEN_CREATE. For example, when TCP is negotiating a
sequence number, they start with a random number. But it fixes the problem
temporarily in my test environment. Otherwise, trivial tests such as
"echo foo > bar.txt" will fail with NFS4ERR_BAD_SEQID.

See http://sourceforge.net/mailarchive/message.php?msg_id=30876822

Signed-off-by: Ming Chen <v.mingchen@gmail.com>
Another NFS4ERR_BAD_SEQ in FSAL_PROXY.

Not sure if this patch always do the right thing. There is little description
about the seqid of CLOSE operation in RFC3530.

See http://sourceforge.net/mailarchive/message.php?msg_id=30876823

Signed-off-by: Ming Chen <v.mingchen@gmail.com>
Add status method for FSAL_PROXY.

This patch adds proper 'fsal_status' method to reflect the way open is handled
by proxy FSAL.  It fixes an infinite loop, which is because the default status
method always return FSAL_O_CLOSED.

Signed-off-by: Ming Chen <v.mingchen@gmail.com>
Signed-off-by: Max Matveev <makc@gmx.co.uk>