openebs-archive / libcstor

CAS Data Engine - Library to serve IOs on uZFS with synchronous replication, snapshots and clones
https://www.openebs.io
Apache License 2.0
18 stars 27 forks source link

fix(cstor): Remove our userspace implementation of io_getevents. #63

Closed sgielen closed 4 years ago

sgielen commented 4 years ago

This userspace implementation was added because it saves a system call if it would not return any new events at that point. However, to do this, it has to cast an intentionally opaque pointer, assume the structure of a kernel object, and read and write to it, which invokes undefined behaviour if the kernel structure is actually different. Concretely, the structure indeed seems to be different for a kernel I am running on arm64.

To ensure no undefined behaviour can happen, remove this optimization.

This PR is a continuation of arm64 stability fixes, see also:

Checklist:

mynktl commented 4 years ago

zrepl is stable with the existing changes as confirmed by the user in https://github.com/openebs/openebs/issues/3028#issuecomment-631708798, hence closing this PR, If required we can revisit this PR.

Thanks @sgielen !