Use sysconf to get proper size of getpw.* and getgr.* buffers

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Acked-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Philippe DENIEL <philippe.deniel@cea.fr>
Acked-by: Matt Benjamin <matt@linuxbox.com>
Relax permission checking on OPEN CREATE

If we have an OPEN CREATE, the file may be created with a mode that would
preclude the access type of the open. That is not what is expected, so
make a best effort determination that we created the file, and use that
to skip permission checking on open.

Note that we REALLY need to make a better effort at atomicity of OPEN CREATE.
This code is subject to a race where our lookup fails, but simultaneously
someone else creates the file in a way that would preclude this OPEN from
opening the file. Particularly insidious would be another user creating the
file...

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Acked-by: Malahal Naineni <malahal@us.ibm.com>
Add export option to enable use of readdir results for negative dirent cache

Most current FSALs do not provide the proper cache coherency to support use
of the readdir results to perform negative dirent caching. Further, some
filesystems support implied files, which are not enumerated in readdir
results but can be looked up directly, in such a case, even with proper
invalidation of dirent cache, use of the dirent cache to infer negative
lookup results would prevent looking up one of these implied files once
a readdir had been performed.

This behavior is controled by a new export option, which defaults to false
in support of the bulk of current FSALs and filesystems.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Acked-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Jim Lieb <lieb@sea-troll.net>
Acked-by: Soumya Koduri <skoduri@redhat.com>
Acked-by: Matt Benjamin <matt@linuxbox.com>
Fix crash if try to open-create an existing non-regular file

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
RPM: updates changelogs in specfile

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
config_parsing: adds CONF_MAND_ macros for INET_PORT and IPV4_ADDR.
Those macros are required for correct tuning of pNFS in FSAL_LUSTRE.

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
pNFS/default methodes: makes an "not implemented" message to default pNFS functions.

This commits adds a log message (directed to COMPONENT_PNFS) when a default
pNFS/DS function is called. These function will return NFS4ERR_NOT_SUPP, using
them usually shows an implementation bug.

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
Lustre/PNFS: repairs the pNFS feature for FSAL_LUSTRE

This commits repairs the previously lost pNFS feature for FSAL_LUSTRE.
All of the pNFS configuration is static and depicted in the config file.

The configuration is splitted in two parts:
- a FSAL_LUSTRE-wide configuration
- some export specific items.

FSAL_LUSTRE-wide configuration describes the usable Data server.
Example:
LUSTRE_PNFS
{
        DATASERVER
        {
                DS_Addr = ganesha_ds2.mynetwork.myhome ;
                DS_Port = 2049 ;
                DS_Id = 1 ;
        }
        DATASERVER
        {
                DS_Addr = ganesha_ds2.mynetwork.myhome ;
                DS_Port = 2049 ;
                DS_Id = 2 ;
        }
}

Export specific configuration in set like this:
EXPORT
{
  (...)
  FSAL {
    name = "LUSTRE";
    PNFS
     {
        Stripe_Unit = 1048576;
        pnfs_enabled = true;
        DATASERVER
        {
                DS_Id = 2 ;
        }
        DATASERVER
        {
                DS_Id = 1 ;
        }
     }
  }
 (...)

On each pNFS data server, a "pNFS aware" ganesha server should run.
pNFS can be enabled for some exports and disabled for others.
Different exports can use different sets of DSs.

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
Fixup config.txt for consistent style

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
export and client mgr need to include the additional field for v42.

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Add sm_notify tool used for stale NLM lock handling.

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Close the file with correct fd if gettattrs fails.

Also, removed setting the file descriptor when we return failure.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Marc Eshel <eshel@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Fix a filename logging in nfs4_op_open

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Frank S. Filz <ffilzlnx@mindspring.com>
Reviewed-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Merge remote-tracking branch 'ganltc/for_2.2_dev1' into next
V2.2-dev-1

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Makes logrotate_ganesha point to the right log in /var/log/ganesha.log by default.

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
FSAL_PROXY: fixes bad seqid in pxy_open_confirm

Change-Id: I6b75d2a16a302cc740854ba680e1e43fa5448c53
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
FSAL_PROXY: fixes bad seqid in pxy_do_close

Change-Id: Ia64a9bf9d143506ad6def83c1ac93784c242ed18
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>