Allow 2 and 4 byte per block chain_info (allow more than 255 snapshots with encryption)

This commit is contained in:
Vitaliy Filippov
2026-04-17 21:22:47 +03:00
parent ddf28feaf8
commit 5d65d87dfb
9 changed files with 48 additions and 14 deletions
+1 -1
View File
@@ -688,7 +688,7 @@ bool osd_messenger_t::allocate_reply_buffers(osd_client_t *cl, osd_op_t *op)
// Read data. In this case we assume that the buffer is preallocated by the caller (!)
unsigned bmp_len = (op->reply.hdr.opcode == OSD_OP_SEC_READ ? op->reply.sec_rw.attr_len : op->reply.rw.bitmap_len);
unsigned expected_size = (op->reply.hdr.opcode == OSD_OP_SEC_READ ? op->req.sec_rw.len : op->req.rw.len);
if (op->reply.hdr.retval >= 0 && (op->reply.hdr.retval != expected_size || bmp_len > op->bitmap_len))
if (op->reply.hdr.retval >= 0 && (op->reply.hdr.retval != expected_size || bmp_len != op->bitmap_len))
{
// Check reply length to not overflow the buffer
fprintf(stderr, "Client %ju read reply of different length: expected %u+%u, got %jd+%u\n",