Add support for ZFS_PREFIX when building ZFS FSAL

This patch simply add support for a ZFS_PREFIX build variable. Useful when
libraries aren't located at the usual place.
Signed-off-by: Thomas Favre-Bulle <thomas.favre-bulle@bull.net>
Fixed CEPH include path when setting CEPH_PREFIX

If CEPH include files aren't at the usual location, manually setting
CEPH_PREFIX parameter with cmake wasn't properly handled.
Signed-off-by: Thomas Favre-Bulle <thomas.favre-bulle@bull.net>
Trim unused members of struct request_data

mtx and cv came and went...

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Clean up loose ends in nfs worker loop.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
FSAL_GLUSTER: coverity fixes - #55632, #55631

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Initial pass of new device id

This implements the new device id with the first byte being an FSAL_ID.

Rather than the rest of the deviceid being an entirely opaque string of
15 bytes, it has been divided up into a uint8_t, a uint16_t, a uint32_t,
and a uint64_t. The deviceid is put on the wire in host byte order, but
these fields make it a little easier for some of the existing PNFS
implementations.

I have disconnected some bits, and almost certainly no one's PNFS
works now.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Move non-per client export options out of export_perms.options

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Create a fsal_filesystem to describe PT

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Remove rwlock from fsal_export

This lock was ONLY taken by (some) create_export and export release. Since
at those times, there can only be a single thread accessing the object, there
is no need for a lock.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Remove unused handle_lib param from FSAL_VFS

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Change min/max constants for pt_export_id

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Use UINT16_MAX and UINT32_MAX in 9p config

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Make FSAL maxread and maxwrite uint64_t to match export options'

Also change max and default to FSAL_MAXIOSIZE

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Use UINT32_MAX and UINT16_MAX in LUSTRE condfig

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Use UINT16_MAX, UINT32_MAX, and FSAL_MAXIOSIZE in FSAL_PROXY

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add some documentation of config options

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix coverity defects
CIDs: 53513, 53512, 53507, 53501, 53502
Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Fix pseudofs readdir method

readdir method of pseudofs expects that the first direntry should have
index 2. This may not be true if we remove export entries due to remove
export dbus command! Use avltree_first() and skip entries that are
before the seek location.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Frank S. Filz <ffilzlnx@mindspring.com>
Handle EXPORT_OPTION_COMMIT if FSAL_O_SYNC is not honored

FSAL_O_SYNC is not always honored, so just setting FSAL_O_SYNC has no
guaranty that this write will be a stable write. Instead, we pretend
that the caller asked for the stable write!

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Marc Eshel <eshel@us.ibm.com>
Fix delayed_get_work() erroneously returning delayed_unemployed

delayed_get_work() seems to work only when there is one node in the AVL
tree (used as heap)! In the current implementation, a node can exist
without any tasks (after the tasks of a node are completed). It returns
delayed_unemployed when all tasks in the first node are emptied even if
the heap has other tasks. This commits makes sure that there is no node
without any tasks and returns delayed_unemployed only if the tree is
empty.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Jim Lieb <jlieb@panasas.com>