Commit Graph

80 Commits (5596ad89978e3be27c536ac975a598626b3f3310)

Author SHA1 Message Date
Vitaliy Filippov f011e0c675 Do not block stabilize by list and list by write 3 years ago
Vitaliy Filippov 0471b09b9c Add license notices to all source code files 3 years ago
Vitaliy Filippov 53832d184a Allow to use lazy sync with replicated pools 3 years ago
Vitaliy Filippov 44973e7f27 Fix replicated pool bugs 3 years ago
Vitaliy Filippov 242d9a42a2 Change object format in prints to %lx:%lx v%lu 3 years ago
Vitaliy Filippov ec7acc8f3a Add WRITE_STABLE operation for future replication support 3 years ago
Vitaliy Filippov 416a80b099 Make blockstore object state a combination of type and workflow 3 years ago
Vitaliy Filippov 571be0f380 Make deletions instantly stable
"2-phase" (write->stabilize) process is pointless for deletions because it
doesn't protect us from incomplete objects. This happens because it removes
the version information from metadata after stabilization. Deletions require
"3-phase" process with a potentially very long 3rd phase.

So, deletions will be allowed to generate degraded and incomplete objects,
and for it to not affect users' ability to delete something, the cluster
will allow to delete whole inodes while storing a list of them in etcd.
Proper TRIM will be impossible until the implementation of the aforementioned
"3-phase" process, though.

By the way, this change also fixes a possible write stall after rebalancing
which was caused by the lack of "stabilize delete" operations.
3 years ago
Vitaliy Filippov 165c204555 Fix BS_OP_DELETE (the implementation was untested up to this point) 3 years ago
Vitaliy Filippov e6a4b634f8 Fix possible write stall
The stall occurred during fio Q=128 random write tests with low flusher_count (4).
It was caused by flushers being unable to flush the beginning of the journal
because it contained older writes to an object that also had writes in the very end
of the journal, after dirty_start.
3 years ago
Vitaliy Filippov c22e096943 Output journal offsets in debug trace in hex, add detailed "still waiting" messages 3 years ago
Vitaliy Filippov 0f43f6d3f6 Fix crashes, print some stats
Notably:
- fix the `delete op` inside lambda callback crash (it frees the lambda itself
  which results in use-after-free with g++)
- fix stop_client() reenterability
- fix a bug in the blockstore layer which resulted in always returning version=0
  for zero-length reads
- change error codes for blockstore_stabilize
3 years ago
Vitaliy Filippov 46f9bd2a69 Make blockstore list operation return consistent snapshots 3 years ago
Vitaliy Filippov 6982fe1255 Do not block reads by previous unfinished writes 3 years ago
Vitaliy Filippov eba053febe Do not start small writes before finishing the last big write to the same object 3 years ago
Vitaliy Filippov 3f522c66e6 Implement immediate commit mode 3 years ago
Vitaliy Filippov c863543bfe Fix possible journal corruption caused by concurrent flushing and writing of the same journal sector 3 years ago
Vitaliy Filippov 1696446545 Rename min/max _used to _flushed 3 years ago
Vitaliy Filippov 41dddddbf2 Fix some logging 3 years ago
Vitaliy Filippov c71b67f2f7 Move SYNC_STAB_ALL into blockstore implementation 3 years ago
Vitaliy Filippov ffe073473a Remove hardcode of the EC(2+1) scheme, now it supports EC(k+1), fix some bugs 3 years ago
Vitaliy Filippov 2b09710d6f Implement blockstore rollback operation
Rollback operation is required for the primary OSD to kill unstable
object versions in OSD peers so they don't occupy journal space
3 years ago
Vitaliy Filippov 43f6cfeb73 Extract alignments to options 3 years ago
Vitaliy Filippov a3d3949dce Do not overwrite same journal sector multiple times
It doesn't reduce actual WA, but it reduces tail latency (Q=32, 10% / 50% / 90% / 99% / 99.95%):
- write: 766us/979us/1090us/1303us/1729us vs 1074us/1450us/2212us/3261us/4113us
- sync: 701us/881us/1188us/1762us/2540us vs 269us/955us/1663us/2638us/4146us
3 years ago
Vitaliy Filippov 111516381f Add FIXME 3 years ago
Vitaliy Filippov cf819eb442 Implement sparse block bitmap to avoid zero-fill 3 years ago
Vitaliy Filippov 4b05bde3a2 Block writes earlier than sync/stabilize would be blocked, too 3 years ago
Vitaliy Filippov b3f2102f33 Add queue stall tracking 3 years ago
Vitaliy Filippov ba23824561 Allow to disable zero fill 3 years ago
Vitaliy Filippov bf3eecc159 Extract 512 to constants 3 years ago
Vitaliy Filippov 4677ace4cc Allow zero-length overwrites 3 years ago
Vitaliy Filippov e8f7905e08 Allow to set write/delete version explicitly 3 years ago
Vitaliy Filippov d3d21e6e0f Rename OP_ to BS_OP_ 3 years ago
Vitaliy Filippov a7e74670a5 Split blockstore implementation and interface header 3 years ago
Vitaliy Filippov 749ab6e2c6 Rename blockstore_operation to blockstore_op_t 3 years ago
Vitaliy Filippov a7a0946ba8 WIP OP_DELETE 4 years ago
Vitaliy Filippov 45f34fb3b2 Fix linear overwrite, make metadata writes ordered, ignore older entries when recovering journal 4 years ago
Vitaliy Filippov b6fff5a77e Fix metadata area size calculation, print free space, wait for free space
FIXME: Now it crashes with -ENOSPC on linear overwrite
4 years ago
Vitaliy Filippov 9fa0d3325f Support inmemory journal 4 years ago
Vitaliy Filippov d56cb290ee Two FIXMEs 4 years ago
Vitaliy Filippov 35a6ed728d Fix another stall due to bad unstable_writes tracking, do not try to write beyond the end of the journal 4 years ago
Vitaliy Filippov 2630e2e3b9 Fix metadata partition length, fix journal allocation at the end 4 years ago
Vitaliy Filippov 9ba243b3ee Add debug prints 4 years ago
Vitaliy Filippov e2b91968c5 Fix sync confirmations and some pipeline-stall bugs 4 years ago
Vitaliy Filippov 74d8ea2f01 Calculate data crc32c 4 years ago
Vitaliy Filippov 1080cbdf12 Fix used journal sector tracking again 4 years ago
Vitaliy Filippov ff7469ee91 Make allocator a class 4 years ago
Vitaliy Filippov b8e53f8c67 Fix op validation, fix journal sector usage tracking
Now it runs for a while with fio but then crashes with ENOSPC because
of an apparent bug in the allocator
4 years ago
Vitaliy Filippov 299b7288d5 Fix journal loading 4 years ago
Vitaliy Filippov b6174075de Fix write iov_len check 4 years ago