cluster/dht: getxattr linkto as root:root

In path based op's like truncate, we use getxattr instead of
fgetxattr call. These can fail with permission denied issues
as linkto file creation, and setattr of ownership is not atomic,
and in cases where setattr failed (subvols down..)

The fix is to perform getxattr as root:root as it is a internal
fop. fgetxattr, bypass the access check, as it already has a valid
open fd.

Change-Id: Ie221c9172e3c1c7ed4e50c8782d362826910756f
BUG: 957074
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/4890
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
cluster/dht: Do not open fd in migration check/complete for non fd ops

if local->fd == NULL, then in dht_migration_check_complete, do not do
open call. Let the layout get updated, and proceed with invoking the
registered target_fn.

if local->fd == NULL, do not call dht_rebalance_in_progress_check for
truncate fop, but proceed with truncate2.

Change-Id: Ia5a5d40bcea7bfb320ef7096af1e035b8847d4ff
BUG: 960055
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/4958
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>