More install-prefix work

- Handle two more hard-coded directories (NFS_V4_RECOV_ROOT and
  DEFAULT_NFS_CCACHE_DIR).
- Create ${SYSSTATEDIR}/run/ganesha, so that ganesha doesn't complain
  with obscure error messages if that directory doesn't exist
Signed-off-by: Daniel Gryniewicz <dang@linuxbox.com>
Add index the layout reply for GPFS FSAL

Signed-off-by: Marc Eshel <eshel@us.ibm.com>
Fix double free on error exit.

Signed-off-by: Marc Eshel <eshel@us.ibm.com>
Add the options to have a Ganesha server that is DS or MDS

Signed-off-by: Marc Eshel <eshel@us.ibm.com>
Name of stackable FSAL NULL updated from NULLFS to NULL

Shared library name is determined as libfsal<FSAL-name-in-lcase>.so
See pathfmt: src/FSAL/fsal_manager.c

Change-Id: Ia37d66fc6d94fa52cef7e4996704c45ea6dd53eb
Signed-off-by: Arun Olappamanna Vasudevan <aolappamanna@cs.stonybrook.edu>
Reviewed-by: Ming Chen <mchen@cs.stonybrook.edu>
Acked-by: Dominique Martinet <dominique.martinet@cea.fr>
Add utility function to load and initialize FSAL module

- Utility function: fsal_load_init()
- Call fsal_load_init() in fsal_commit()

Change-Id: I6d4cda982f3758f8d24ccc49a95eb582bb0071de
Signed-off-by: Arun Olappamanna Vasudevan <aolappamanna@cs.stonybrook.edu>
Reviewed-by: Ming Chen <mchen@cs.stonybrook.edu>
Acked-by: Dominique Martinet <dominique.martinet@cea.fr>
Support stacking multiple FSALs

* For a config file such as
EXPORT { FSAL { name = "stk1";
                FSAL { name = "stk2";
                       FSAL { name = "FS";
                            }
                     }
              }
       }
* Config parser processes EXPORT block and identifies FSAL associated with the
  export - 'stk1'. Library (libfsalstk1.so) is loaded and 'stk1' is registered
  as an FSAL.
* 'stk1_create_export' being a stackable FSAL is concerned about sub-FSAL right
  below it:
  FSAL { name = "stk1";
         FSAL { name = "stk2";
                ...
              }
       }
  After parsing the sub-FSAL name, subfsal_commit loads the sub-FSAL and gets
  it's 'create_export' function registered. 'stk2_create_export' is then called.
* 'stk2_create_export' behaves similar to 'stk1_create_export' - loads library
  'libfsalfs.so' and calls 'fs_create_export'
This enables stacking of as many stackable FSALs on top of a regular FSAL.

Change-Id: I9ed9373c63eb9d09b97d03da5ccc302f4df1819a
Signed-off-by: Arun Olappamanna Vasudevan <aolappamanna@cs.stonybrook.edu>
Reviewed-by: Ming Chen <mchen@cs.stonybrook.edu>
Acked-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'marc/double-free' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'marc/mds-ds' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'dang/install-prefix' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'sbu-fsl/multistack_r3' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
V2.2-dev-15

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix dbus_append_timestamp() for 32 bit systems.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reported-by: Krishna Harathi <kharathi@exablox.com>
Acked-by: Jim Lieb <lieb@sea-troll.net>
Use dbus_bool_t rather than an int to pass to dbus boolean type

dbus_bool_t is probably an int, but having the correct type is better.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Jim Lieb <lieb@sea-troll.net>
export_id is uint16 bit integer, so we should pass DBUS_TYPE_UINT16

Passing DBUS_TYPE_INT32 will make the dbus code access 2 bytes of
incorrect memory space!

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Jim Lieb <lieb@sea-troll.net>
ishealthy is calculated when needed, so avoid having it the structure.

get_ganesha_health() now returns a boolean rather than updating a field in
a structure. The boolean is converted to a dbus_bool_t before passing it
to dbus code.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Jim Lieb <lieb@sea-troll.net>
Fix record_stats definition to accommodate its callers usage!

Fixed the record_stats() definition to comply with its callers! This
patch fixes some incorrect statistics reports (latency and queue wait
time).

Reported-by: Frank Geisenheiner <FGEISEN@de.ibm.com>
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>