Commit Graph

33 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov bf9a175efc Move C/C++ sources to src subdirectory 2021-02-25 23:59:03 +03:00
Vitaliy Filippov 4a2dcf7b6b Update the license to VNPL 1.1
VNPL 1.1 is slightly reworded to make it clear that proprietary software
interacting with Vitastor and providing some kind of service to end users isn't
a "Proxy Program" if it's not specially designed to be used with Vitastor.

For example, Windows OS running in a virtual machine stored in a Vitastor
cluster clearly isn't.
2021-02-25 23:55:33 +03:00
Vitaliy Filippov 1018764c91 Fix write->delete->write bugs, add & fix some debugging output 2020-12-04 23:21:58 +03:00
Vitaliy Filippov faa5e1436f Attempt journal trim even without new flushes
This is the new guaranteed unblocking method which replaces old trims
in init and rollback, and also fixes a possible stall when just several
writes in the beginning of the journal are flushed without triggering
a subsequent trim.
2020-10-24 01:28:47 +03:00
Vitaliy Filippov 5fbe36198a Fix journal trimming
1) Update journal's used_start in memory only after updating journal superblock.
Doing the opposite is incorrect because part of the journal will be lost if writers
overwrite its old beginning.

2) Sync journal device after updating the superblock.

3) Do not trim in rollback and init because trimming there would also require
updating the superblock. And the only reason to trim in both those places was
to unblock writers. And a guaranteed unblocking method will follow in the next
commit :)
2020-10-24 01:08:33 +03:00
Vitaliy Filippov 0471b09b9c Add license notices to all source code files 2020-09-17 23:07:06 +03:00
Vitaliy Filippov 165c204555 Fix BS_OP_DELETE (the implementation was untested up to this point) 2020-06-02 14:26:01 +03:00
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.
2020-06-01 16:18:23 +03:00
Vitaliy Filippov c3737ae3ff Add journal fsync to stabilize/rollback 2020-03-09 00:35:58 +03:00
Vitaliy Filippov c863543bfe Fix possible journal corruption caused by concurrent flushing and writing of the same journal sector 2020-03-08 01:21:19 +03:00
Vitaliy Filippov b27ad550cf Use btree_map instead of sparsepp 2020-03-04 17:12:27 +03:00
Vitaliy Filippov 1733de2db6 Test & fix single-PG primary OSD
- Add support for benchmarking single primary OSD in fio_sec_osd
- Do not wait for the next event in flushers (return resume_0 back)
- Fix flushing of zero-length writes
- Print PG object count when peering
- Print journal free space when starting and when congested
2020-02-26 19:05:29 +03:00
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
2020-01-24 20:18:14 +03:00
Vitaliy Filippov cf819eb442 Implement sparse block bitmap to avoid zero-fill 2020-01-12 02:55:32 +03:00
Vitaliy Filippov a7e74670a5 Split blockstore implementation and interface header 2019-12-15 14:57:18 +03:00
Vitaliy Filippov aaea3e1f99 Fix read_fulfill, use vector 2019-12-03 12:09:30 +03:00
Vitaliy Filippov fd13965b90 Force start when journal is full 2019-12-03 02:23:29 +03:00
Vitaliy Filippov aa3b252327 Fsync data before writing metadata 2019-12-03 00:20:13 +03:00
Vitaliy Filippov 76caecf7c7 Inmemory metadata mode 2019-12-02 15:42:42 +03:00
Vitaliy Filippov f4d06ba102 OP_DELETE flushing 2019-12-02 02:41:14 +03:00
Vitaliy Filippov 00eeedae90 Add "fsync disabled" mode 2019-12-01 16:41:07 +03:00
Vitaliy Filippov 40781c67b2 Trim journal on start 2019-11-29 02:13:32 +03:00
Vitaliy Filippov 9fa0d3325f Support inmemory journal 2019-11-28 18:06:50 +03:00
Vitaliy Filippov 95396e2c83 Note read errors 2019-11-28 00:37:20 +03:00
Vitaliy Filippov 35a6ed728d Fix another stall due to bad unstable_writes tracking, do not try to write beyond the end of the journal 2019-11-28 00:28:08 +03:00
Vitaliy Filippov 9568354d78 Fix old_clean_loc treatment (cannot persist sparse_hash_map iterator) 2019-11-27 02:16:43 +03:00
Vitaliy Filippov be3015169f Safe stop procedure 2019-11-25 01:29:07 +03:00
Vitaliy Filippov a4aaa3c7c7 First implementation of journal trimming
In theory it's possible to start testing blockstore at this point!
2019-11-15 16:12:55 +03:00
Vitaliy Filippov c38c8ab029 Prevent two parallel flushes of the same object 2019-11-15 13:58:35 +03:00
Vitaliy Filippov 71194f014a Update dirty_db and clean_db after flushing an entry 2019-11-15 02:26:18 +03:00
Vitaliy Filippov f1e236c6e8 Sync metadata & data after copying from journal 2019-11-14 14:09:07 +03:00
Vitaliy Filippov 1c6b9778a4 Handle all io_uring events using lambdas 2019-11-13 22:46:42 +03:00
Vitaliy Filippov 214da03735 Move flusher into a separate file 2019-11-13 17:46:05 +03:00