]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: Endian fix for handling old image format resize requests
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 2 Sep 2019 19:28:18 +0000 (21:28 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Sep 2019 08:50:04 +0000 (10:50 +0200)
commitcfaa681249b70a96e31b425a81f28aca1dedfebf
treea05c53b6def0950831ee9744dbb042e352578b40
parent34ea4311dd3653e909279cd865e0fdd0cae673d1
librbd: Endian fix for handling old image format resize requests

ResizeRequest<I>::send_update_header contains a comment
    // NOTE: format 1 image headers are not stored in fixed endian
format

This statement appears incorrect; Linux kernel code handling the old
format headers does assume they are in fixed little-endian format.

Fixed by performing a byte-swap as everywhere else; this actually
fixes test suite failures on big-endian systems.

Fixes (partially): https://tracker.ceph.com/issues/41605

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
src/librbd/operation/ResizeRequest.cc