From: Satoru Takeuchi Date: Fri, 12 Nov 2021 12:08:33 +0000 (+0000) Subject: rbd: correct encoding of snap protection record in exporting image X-Git-Tag: v17.1.0~398^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b80c3b84382b775ae781c3fa042b09fdbfdc0a69;p=ceph-ci.git rbd: correct encoding of snap protection record in exporting image Correct the size of `protection` field. This bug is harmless since Export/Import writes/reads one byte for `protected` field regardless of `length` field. So the current wrong diff works correctly by chance Fixes: https://tracker.ceph.com/issues/53243 Signed-off-by: Satoru Takeuchi --- diff --git a/src/tools/rbd/action/Export.cc b/src/tools/rbd/action/Export.cc index 21ece1fecfa..dff10c97e1a 100644 --- a/src/tools/rbd/action/Export.cc +++ b/src/tools/rbd/action/Export.cc @@ -173,7 +173,7 @@ int do_export_diff_fd(librbd::Image& image, const char *fromsnapname, if (r < 0) { return r; } - len = 8; + len = 1; encode(len, bl); encode(is_protected, bl); }