Prevent two parallel flushes of the same object

This commit is contained in:
Vitaliy Filippov
2019-11-15 13:58:35 +03:00
parent 71194f014a
commit c38c8ab029
4 changed files with 83 additions and 21 deletions
+5 -1
View File
@@ -33,7 +33,6 @@
#define ST_J_WRITTEN 3
#define ST_J_SYNCED 4
#define ST_J_STABLE 5
#define ST_J_MOVE_READ_SUBMITTED 6
#define ST_J_MOVE_WRITE_SUBMITTED 7
#define ST_J_MOVE_SYNCED 8
@@ -109,6 +108,11 @@ inline bool operator == (const object_id & a, const object_id & b)
return a.inode == b.inode && a.stripe == b.stripe;
}
inline bool operator != (const object_id & a, const object_id & b)
{
return a.inode != b.inode || a.stripe != b.stripe;
}
inline bool operator < (const object_id & a, const object_id & b)
{
return a.inode < b.inode || a.inode == b.inode && a.stripe < b.stripe;