Adjust log levels of COMPONENT_EXPORT debug to improve utility

LogDebug - shows various export related activities
LogMidDebug - adds export permission checking
LogFullDebug - adds debugging of export database

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Protect junction inodes and export root inodes from rename

Since these are mount points, we protect from rename.

Unfortunately there is no way to signal the client to return the expected
EBUSY error, so we return NOT EMPTY, which will be a little odd, but seems
the best fit.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add a debug log in cache_inode_readdir.c

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add kill_export_junction_entry to handle ESTALE on a junction inode

If we lose a junction inode, we don't remove the export but we must
unmount from the PseudoFS.

This patch also cleans up a bit of unmounting from the PseudoFS stuff
to make sure it doesn't skip stuff if exp_junction_inode is NULL.

Basically we always clean up the PseudoFS an export is mounted on.

Also, if exp_junction_inode is non-NULL, we clean up that.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix fsal_filesystem indexing issues

If libblkid is not present, we will use the fsid from stat_fs. The minor
and major fields in that are int32_t. Directly converting to uint64_t
entails sign extending a negative number first, which results in values that
don't match as expected when only 32 bits for each field are put into the
wire handle. By casting to unsigned first, the sign extension does not occur.

There was also a minor issue in that fsid_type was not set before inserting a
filesystem into the database if fsid_type was changed. Now that the comparison
function takes fsid_type into account (to handle FSID_MAJOR_64), this must
be changed before insert to the table.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Standardize log format of fsid to make searching log easier

Always format fsid in log as "0x%016"PRIx64".0x%016"PRIx64

32 bit quantities subsitute PRIx32 but still print in 16 digits.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Always invent a handle for inode that is junction to another FSAL from FSAL_VFS

By always inventing a handle, even if we COULD create a legitimate handle for
the inode (FSAL_VFS can always do this, FSAL_XFS not so), vfs_check_handle
works better since it knows the handle is invented and thus is ok that
it references a filesystem that belongs to a different FSAL.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>