Add "external" bitmap support to blockstore

This commit is contained in:
Vitaliy Filippov
2021-04-10 17:44:12 +03:00
parent 95c29b9dc3
commit 6107a4d07b
10 changed files with 111 additions and 25 deletions
+5
View File
@@ -64,6 +64,10 @@ Input:
- offset, len = offset and length within object. length may be zero, in that case
read operation only returns the version / write operation only bumps the version
- buf = pre-allocated buffer for data (read) / with data (write). may be NULL if len == 0.
- bitmap = <entry_attr_size> bytes long arbitrary data stored for each object in the metadata area.
when <entry_attr_size> fits into pointer size, it should be passed as this field's value.
when it doesn't fit, this field should be a pointer to that piece of data.
named "bitmap" because it's used for the "external bitmap" in Vitastor.
Output:
- retval = number of bytes actually read/written or negative error number (-EINVAL or -ENOSPC)
@@ -141,6 +145,7 @@ struct blockstore_op_t
uint32_t offset;
uint32_t len;
void *buf;
void *bitmap;
int retval;
uint8_t private_data[BS_OP_PRIVATE_DATA_SIZE];