Fix the compatibility wrapper on PPC

The PPC architecture packs the work request struct 1.0 in such a way
that a straight memcpy won't work.  Instead, break the copy out into
chunks whenever the sizes don't match for given portions of the struct.

Found by built in gcc memcpy buffer overflow checks.

Help on the right fix provided by Jakub Jelinek from the gcc
team inside Red Hat.

Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
1 file changed