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
+5
View File
@@ -10,6 +10,11 @@ struct __attribute__((__packed__)) object_id
uint64_t stripe;
};
inline uint64_t operator % (const object_id & a, const uint64_t b)
{
return ((a.inode % b) * (0x100000000 % b) * (0x100000000 % b) + a.stripe % b) % b;
}
inline bool operator == (const object_id & a, const object_id & b)
{
return a.inode == b.inode && a.stripe == b.stripe;