[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxc: Only retry mapping pages when ENOENT is returned



# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1326209701 0
# Node ID fc78d16447b49491c560c99491a9ce47cad5765f
# Parent  5b2676ac13218951698c49fa0350f2ac48220f3d
libxc: Only retry mapping pages when ENOENT is returned

If the return value from the ioctl() is not ENOENT, it's possible that err[i]
will not be updated and libxc will just loop forever.  Although it's unlikely
that err[i] would not be updated after the ioctl() gets through at least once,
it's better to be defensive.

Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 5b2676ac1321 -r fc78d16447b4 tools/libxc/xc_linux_osdep.c
--- a/tools/libxc/xc_linux_osdep.c      Mon Jan 09 16:01:44 2012 +0100
+++ b/tools/libxc/xc_linux_osdep.c      Tue Jan 10 15:35:01 2012 +0000
@@ -232,7 +232,7 @@
             do {
                 usleep(100);
                 rc = ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH_V2, &ioctlx);
-            } while ( rc < 0 && err[i] == -ENOENT );
+            } while ( rc < 0 && errno == ENOENT && err[i] == -ENOENT );
         }
     }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.