io-cache: fix unsafe typcasting of pointer to uint64

The typecast of pointer to uint64_t *, followed by setting of
64bit in inode_ctx_get() results in memory corruption on 32bit
system.

Change-Id: I32fa3bf3b853ed2690a9b9a471099a59b9d7186a
BUG: 997902
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5879
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
mount/fuse: save the basefd flags in the new fd

Upon graph switch, the basefd's flags were not saved in the new fd created
for the new graph upon which all the further requests for the open file
would come. Thus posix was treating the fd as a read-only fd and was
denying the write on the fds.

Change-Id: I781b62b376a85d1a938c091559270c3f242f1a2a
BUG: 998352
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/5880
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>