Make NFSv3 FSID unique/less collision prone
By performing xor on filesystem_id major and rotated minor numbers.
This allows client to mount one export on top of other even if the
major numbers of the exported filesystem is same.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Increase the Ganesha inode cache limit to match the GPFS cache limit.
Done for READDIR performance improvement.

Signed-off-by: suhrud <supatank@in.ibm.com>
This branch will fix RTC defect 16867. The fix will use condition flag inside
while loop in both ptfsal_closeHandle_listener_thread and ptfsal_polling_closeHandler_thread.
In function PTFSAL_terminate, first set the flag to stop above two two thread functions.
Replace pthread_kill with pthread_join for thread g_pthread_closehandle_lisetner.

Signed-off-by: Jeff Huang <huangz@us.ibm.com>
Commit for pt v4.1 rev_10

Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Reduce wait time in stop.
30 seconds sleep is not necessary in most of the cases.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Make debugging permission checking easier.

Using COMPONENT_NFS_V4_ACL will allow tracing permission checking at
all layers. If it is not turned on, some log messages will go to
COMPONENT_CACHE_INODE or COMPONENT_NFSPROTO.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Make sure asked_attributes is set when calling cache_inode_getattr

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Fix typos in FSAL/access_check.c

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Add some debug for cache_inode_rename and cache_inode_remove

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Fix FSAL_MODE_BIT_MASK to ONLY include FSAL_R_OK, FSAL_W_OK, FSAL_X_OK

These are the only permission mask bits that matter for mode checking.

Extra bits caught the new FSAL_ACE4_PERM_CONTINUE flag.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Fix a problem with idmapper with AUTH_SYS

nfs4_gss_princ_to_ids will fail if GSS is not involved. This caused
id mapping to fail in an AUTH_SYS environment (id mapping is still
used in that environment for FATTR4_OWNER and FATTR_OWNER_GROUP.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Return EPERM instead of EACCESS for ACL when appropriate

EPERM is expected when ACE4_WRITE_ATTR, ACE4_WRITE_ACL, or
ACE4_WRITE_OWNER are required and either not granted or
explicitly denied.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Fix directory cache in cache_inode_rename

Make sure errors in adjusting directory cache don't cause us to skip
adjusting the other directory entries.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Make sure nfs_access_op asks for denies bits

Without asking for denied bits FSAL_ACE4_PERM_CONTINUE doesn't work right.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Set process umask from config

If process umask isn't set from config, then files created may not get
the expected mode.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Break out of FSAL_ACE4_PERM_CONTINUE if deny blocks all remaining mask bits

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Add NLM compiler flags around cancel_all_nlm_blocked

Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Add EROFS to posix2fsal_error

Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Do not check/fail on getattr error for a file that is unlinked in cache_inode_remove

Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Fixed byte range lock merging when up- or downgrading sub-ranges

Signed-off-by: Manfred Haubrich <haubrich@de.ibm.com>