Piotr Kliczewski has posted comments on this change.

Change subject: infra: Introduce EventFD support
......................................................................


Patch Set 7:

(3 comments)

https://gerrit.ovirt.org/#/c/37051/7/lib/vdsm/infra/eventfd/__init__.py
File lib/vdsm/infra/eventfd/__init__.py:

Line 85:           which time, the read() proceeds as described above) or fails 
with
Line 86:           the error EAGAIN if the file descriptor has been made 
nonblocking.
Line 87:         """
Line 88:         n = ctypes.c_uint64()
Line 89:         rv = libc.read(self._fd, ctypes.pointer(n), 8)
> we know the sky will not fall and that sizeof(uint64) == 8 is and will be T
Done
Line 90:         if rv < 0:
Line 91:             err = ctypes.get_errno()
Line 92:             if err != 0:
Line 93:                 msg = os.strerror(err)


Line 104:         blocks until a read() is performed on the file descriptor, or 
fails
Line 105:         with the error EAGAIN if the file descriptor has been made 
nonblocking.
Line 106:         """
Line 107:         n = ctypes.c_uint64(value)
Line 108:         rv = libc.write(self._fd, ctypes.pointer(n), 8)
> same
Done
Line 109:         if rv < 0:
Line 110:             err = ctypes.get_errno()
Line 111:             if err != 0:
Line 112:                 msg = os.strerror(err)


Line 109:         if rv < 0:
Line 110:             err = ctypes.get_errno()
Line 111:             if err != 0:
Line 112:                 msg = os.strerror(err)
Line 113:                 raise OSError(err, msg)
> these five lines above looks exactly the same as in read(), can they be fac
Will combine
Line 114: 
Line 115:     def close(self):
Line 116:         "Closes the fd and clears the internal counter"
Line 117:         if self._fd != -1:


-- 
To view, visit https://gerrit.ovirt.org/37051
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6035d4a8dc13ce11cf0425e4945bbf0c19bd92a7
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to