Adding virFileAccessibleAs() to check if the backing file described in
disk meta exist in real path. If not, report error. The uid and gid
arguments don't take effect on F_OK mode for access, so use gid and gid
of current process.

This patch doesn't break anything new, but thanks to the
getuid()/getgid(), it leaves the previous problem in the code. Even
though F_OK doesn't need uid/gid to check whether the file exists, root
may not have permissions for upper directories on NFS storage for
example, so ...

... this hunk does make the code report better errors, but in the future
it should canonicalize the filename using root/qemu/domain users.
ACK to this hunk, with the error reworded (e.g. "Cannot access backing
file %s") and, of course, commit message changed appropriately, but ...

To fix a pre-existing error, we should (instead of this change) just add
virResetLastError() here as the error is used somewhere else in the code
and should be kept in virFindBackingFile(). Having it in the logs seems
OK to me.

It makes sense, but it seems that the tests/virstoragetest.c testcase is
using the

last error in checking warning flag, see:
if (data->flags & EXP_WARN) {
if (!virGetLastError()) {
fprintf(stderr, "call should have warned\n");
goto cleanup;
}
virResetLastError();
It is not serious issue without calling virResetLastError() here.