Implement object list operation in blockstore

This commit is contained in:
Vitaliy Filippov
2019-12-19 20:50:20 +03:00
parent e8f7905e08
commit e88ad3f2ff
4 changed files with 101 additions and 2 deletions
+16
View File
@@ -19,15 +19,31 @@
#define MAX_BLOCK_SIZE 128*1024*1024
#define DISK_ALIGNMENT 512
#define BS_OP_MIN 1
#define BS_OP_READ 1
#define BS_OP_WRITE 2
#define BS_OP_SYNC 3
#define BS_OP_STABLE 4
#define BS_OP_DELETE 5
#define BS_OP_LIST 6
#define BS_OP_MAX 6
#define BS_OP_TYPE_MASK 0x7
#define BS_OP_PRIVATE_DATA_SIZE 256
/* BS_OP_LIST:
Input:
- len = divisor
- offset = modulo. object is listed if (object_id % len) == offset.
Output:
- retval = total obj_ver_id count
- version = stable obj_ver_id count
- buf = obj_ver_id array allocated by the blockstore. stable versions come first
*/
struct blockstore_op_t
{
// operation