Commit Graph
100 Commits
Author SHA1 Message Date
Vitaliy Filippov 462482d319 Fix zero-padded big_write checksum verification in the new store 2026-07-04 21:37:22 +03:00
Vitaliy Filippov 5ef9d78461 Release 3.0.15
- QEMU virtual disk migration with enabled iothread is finally fixed correctly.
- Fixed operation of Proxmox VMs with swTPM without enabling NBD for all disks.
- Debian packages are now again built with stable Antietcd released instead of
  the unstable master branch.
- Antietcd cluster mode previously broken in that master branch is fixed. The
  symptom was Antietcd being unable to elect the leader in a cluster.
- Fixed monitor startup with embedded Antietcd when using IPv6.
- Fixed space statistics calculation for FS and S3 pools in the new storage ([PR #127](https://github.com/vitalif/vitastor/pull/127)).
2026-06-28 11:29:38 +03:00
Vitaliy Filippov 1b20010a69 Install npm packages in debian/rules 2026-06-28 11:29:27 +03:00
Vitaliy Filippov d750d00c6f Fix SWTPM in Proxmox 2026-06-27 16:04:51 +03:00
Vitaliy Filippov 66cb564e2c Fix background jobs in etcd_fail test 2026-06-27 15:42:53 +03:00
Vitaliy Filippov f782decbd6 Update antietcd to 1.3.1 2026-06-27 15:42:42 +03:00
Vitaliy Filippov 717582c4ba Use release builds of antietcd&tinyraft in debian packages (not master branch) 2026-06-27 10:27:15 +03:00
Vitaliy Filippov cd62c0755f Fix IPv6 antietcd configuration 2026-06-27 00:16:03 +03:00
Vitaliy Filippov 09607ddcbe Actual fix for live migration with iothread 2026-06-23 00:07:34 +03:00
Vitaliy Filippov 278852b4d5 Release 3.0.14
How many (bugs!) I've knifed, how many I've slit!

General note: most bug fixes now include regression tests to verify that they don't repeat in the future.
Most bugs fixed in this release were detected by using LLM analysis (Claude Opus/Fable, GPT 5.5).

OSD:
- Fix OSD hanging with an infinite loop when setting autosync_interval to 0 at runtime
- (IMPORTANT) Fix EC PGs hanging in REPEERING when the last final commit/rollback in a
  batch completes with an error
- Limit pg_size by 64 because peering doesn't handle larger values with EC — they just
  lead to 'incomplete' objects
- Fix OSD crash with an "assertion failed" error on EIO retry in snapshot chain read
  (i.e. when some chunks belong to a corrupted replica with checksum mismatch)
- (IMPORTANT) Disable chunked PG count resharding due to possible interference with
  compaction changes (will be re-enabled after fixes)
- (IMPORTANT) Fix incorrect snapshot allocation bitmap recovery during EC chained read
- Add on-wire request size validation to prevent possible OOM/DoS/heap corruption
  on receiving invalid data from the network
- (IMPORTANT) Fix parity-less EC writes destroying snapshot allocation bitmaps
  (i.e. when all parity OSDs in a PG are missing)
- (IMPORTANT) Fix EC N+K, K>=2 recovery destroying snapshot allocation bitmaps
  of live parity chunks
- (IMPORTANT) Fix a possible OSD crash during EC misplaced object scrubbing
- (IMPORTANT) Verify object bitmap consistency during scrub (only data was checked previously)
- (IMPORTANT) Fix corrupted object chunks incorrectly marked as non-corrupted on the second scrub
- (IMPORTANT) Fix cached EC decoding of multiple stripes with ISA-L (ISA-L is the default)

New store:
- Fix a theoretically possible OSD crash on startup when using the previously added
  workaround for the "double-claim" problem
- Remove theoretically possible incorrect metadata block writes during batch EC COMMITs
  restarted due to a full metadata area
- Fix incorrect compaction counter tracking after OSD restart (could probably lead to
  compaction not restarted correctly after a restart)
- (IMPORTANT) Fix some of parallel big_writes possibly not waiting for data fsync, thus not providing durability
- Fix possible OSD crash on sync retry when io_uring is full
- Fix a possible crash during startup on corrupted on-disk data with too small entry sizes

Old store:
- Prevent loading extra garbage metadata entries from the last 4 MB of metadata area
- Fix read operations possibly crashing if a metadata read (with inmemory_metadata=false)
  was restarted due to a full io_uring
- Fix a possible memory leak of temporary buffers and bitmaps/checksums when a read
  was restarted due to a full io_uring (reproducible with either inmemory_metadata=false or block_size>256k)
- Fix a possible OSD crash during padded checksum reads if buffer count exceeded 1024
  (IOV_MAX) (reproducible only with csum_block_size > 4k and block_size >= 4M)
- (IMPORTANT) Fix partial padded read journal checksum verification with csum_block_size > 4k
- Fix incorrect marking of corrupted objects as non-corrupted after flushing data
  from journal (with inmemory_journal=false)
- (IMPORTANT) Fix deferred freeing of a different block when a block was used by a parallel read
- Fix per-inode statistics not being disabled for FS and S3 pools correctly, leading to etcd
  overload with unneeded per-inode statistics, slower etcd operation, increased memory usage,
  and too many Prometheus statistics exported by the monitor

Both stores:
- Fix possibly left garbage in the metadata area if the first OSD startup was interrupted —
  metadata header is now written only after initializating metadata
- Check for short reads during initialization (just in case, doesn't happen in real life)

Clients:
- Fix write-back queue item split in case when write-back is enabled at runtime
- Implement bdrv_detach_aio_context & bdrv_attach_aio_context in the QEMU driver (should fix migration with iothread)
- Do not crash on full io_uring in ublk server
- Fix missing --readonly option handling in NBD server
- Stop gracefully on NBD_CMD_DISC instead of just exit(0) in NBD server
- Fix writeback detection in ublk server for --image mode
- Limit the amount of incoming data for NFS clients to prevent choking on memory in async mount mode

Tools (vitastor-disk/vitastor-cli):
- Prevent vitastor-cli merge possibly exiting before completing the last sync/delete operations
- Fix vitastor-disk incorrectly validating too large small_write entry length
- Fix vitastor-cli merge ignoring input option validation errors
- Fix vitastor-cli rm-data always skipping the final fsync
- Fix vitastor-disk resize not moving the last used data block
- Fix vitastor-disk write-meta incorrectly importing new store small_write entries
- Fix vitastor-disk write-journal and write-meta importing old store data incorrectly
  when csum_block_size is > 4k
- Support --io option for vitastor-disk dump-journal/write-journal
- Fix vitastor-disk resize crash when converting from very old (0.5.x) metadata
- Fix vitastor-disk trim incorrectly rounding block ranges with --discard_granularity
  option explicitly set to a value > 4k, possibly leading to discarding live data
- Fix vitastor-disk write-meta importing new store metadata incorrectly with > 4 GB metadata area size
- (IMPORTANT) Fix vitastor-cli modify --resize to a smaller size clearing all image data O_o

Other:
- Do not crash with an uncaught exception when an invalid /osd/state/ with a non-numeric
  suffix is present in etcd (in OSD and all client services)
- Fix possible crash in vitastor-kv when handling a corrupted DB due to a uint32 overflow
- Fix NFS-RDMA memory allocator crashing in some situations
- Fix small shared file extend-write potentially reading unallocated memory (NFS)
- Add bounds checks to prevent uint32 overflows in NFS/XDR
- Re-enable accidentally disabled safety checks (asserts) in files with included cpp-btree
- Fix too small memory allocation in NFS portmap
2026-06-21 18:17:02 +03:00
Vitaliy Filippov 7b11c6e90d Add a regression test for v1 store attempting to load overflowing garbage from the end of metadata area (commit 6b003bcc34) 2026-06-21 17:23:50 +03:00
Vitaliy Filippov 6251ce8b9a Add a regression test for incorrect deferred freeing of data block (commit 43aa4cfff6) 2026-06-21 16:49:38 +03:00
Vitaliy Filippov d4a42f61cf Handle full io_uring in ublk-server 2026-06-21 01:40:49 +03:00
Vitaliy Filippov 6b003bcc34 Protect against done_cnt > block_count, just in case 2026-06-20 21:05:06 +03:00
Vitaliy Filippov 1c945bcb41 Make check_completed a macro in test_cluster_client 2026-06-20 20:18:31 +03:00
Vitaliy Filippov 716527b184 Fix missing --readonly handling in NBD server 2026-06-20 11:52:29 +03:00
Vitaliy Filippov 8c0486bd76 Fix bounds check in kv_db (fix invalid input handling?) 2026-06-20 11:43:33 +03:00
Vitaliy Filippov d2cf271f64 Track in_flight for sync & delete in vitastor-cli merge 2026-06-20 11:43:33 +03:00
Vitaliy Filippov d93b488e32 Just in case - OP_SYNC cannot fail but handle its error in vitastor-cli dd 2026-06-20 11:43:33 +03:00
Vitaliy Filippov fbffec5abb Add a regression test for the last 2 fixed bugs 2026-06-20 11:18:09 +03:00
Vitaliy Filippov b6eb8f2055 Add missing sqe retries on metadata read 2026-06-20 11:15:38 +03:00
Vitaliy Filippov e373ea2163 Fix freeing of dyn_data and temp metadata block buffers on read cancel
A regression test would also be fun
2026-06-20 02:10:11 +03:00
Vitaliy Filippov 5e12b4a1a5 Fix OOB read in old store checksum read if block count exceeds IOV_MAX (almost unreachable)
May be fun to write a regression test for it :) IOV_MAX is 1024, so it requires at least a 4 MB object...
2026-06-20 02:03:45 +03:00
Vitaliy Filippov 78b067566f Do not use std::stoull as it may throw 2026-06-20 01:54:49 +03:00
Vitaliy Filippov cf3abdb9e3 Clear autosync_timer when autosync_interval is set to 0
Clear other timers similarly (but their interval can't be 0)
2026-06-20 01:50:44 +03:00
Vitaliy Filippov 826b35b369 Do not try to erase_double_claim entries during iteration 2026-06-19 22:05:44 +03:00
Vitaliy Filippov cdc730314b Fix EC PGs hanging in REPEERING when flush error is last in the batch 2026-06-19 01:49:26 +03:00
Vitaliy Filippov 5248d7f324 Fix 2 bugs in NFS-RDMA allocator, add a test for both
1) alloc() could add the region start into freelist instead of its free part
2) free() was merging freed buffers incorrectly both forward and backward
2026-06-19 02:08:41 +03:00
Vitaliy Filippov 4161f0bd01 Remove doubtful metadata block write logic from blockstore_stable on metadata ENOSPC 2026-06-18 00:55:57 +03:00
Vitaliy Filippov 5627977a9b Limit pg_size by 64 2026-06-18 00:24:48 +03:00
Vitaliy Filippov ec9cfa76c1 Fix to_compact_count tracking on load in the new store 2026-06-18 00:21:03 +03:00
Vitaliy Filippov 0c88884576 Fix incorrect batch big_write fsync logic in the new store 2026-06-18 00:04:15 +03:00
Vitaliy Filippov ba7637d9ad Add a test for incorrect batch big_write fsync logic in the new store 2026-06-18 00:04:15 +03:00
Vitaliy Filippov ac1025c7a5 Fix read small_write.len before init 2026-06-17 17:41:51 +03:00
Vitaliy Filippov 2a81cef78a Fix crash on EIO retry in chained read 2026-06-17 16:38:20 +03:00
Vitaliy Filippov bcf6a7c7d1 Fix write-back queued items split in the client 2026-06-17 16:15:39 +03:00
Vitaliy Filippov 85c4be3957 Clear lsn on sync retry to prevent possible crash on full io_uring 2026-06-17 15:40:05 +03:00
Vitaliy Filippov cf2ba05e4b Disable chunked resharding -- it may interfere with journal flushing; will be re-enabled after fixes 2026-06-17 15:35:19 +03:00
Vitaliy Filippov 04c2f8d408 Stop gracefully on NBD_CMD_DISC instead of just exit(0) 2026-06-17 12:46:03 +03:00
Vitaliy Filippov 0e528ca8f3 Fix missing start_merge() error check 2026-06-17 12:42:23 +03:00
Vitaliy Filippov c6f733b96a Fix final sync in vitastor-cli rm-data 2026-06-17 12:41:22 +03:00
Vitaliy Filippov 938ac09248 Fix small shared file extend-write potentially reading unallocated memory 2026-06-17 12:36:04 +03:00
Vitaliy Filippov 3becdbf5b9 Add bounds checks to prevent uint32 overflows in NFS/XDR 2026-06-17 12:04:50 +03:00
Vitaliy Filippov 9c49315fdf Fix moving of the last block in vitastor-disk resize 2026-06-17 01:19:12 +03:00
Vitaliy Filippov 430d3cfb6f Add a dump|load test, fix multiple bugs in both new&old dump/load utils
Details:
- New store dump/write-meta didn't use actual metadata parameters from the header
- New store write-meta calculated small entry sizes incorrectly
- Old store write-journal imported entries with checksums incorrectly
- Old store write-meta didn't import block_csums at all (it was using a wrong json key)
2026-06-17 01:19:12 +03:00
Vitaliy Filippov c491db699c Implement bdrv_detach_aio_context & bdrv_attach_aio_context (should fix migration with iothread) 2026-06-17 00:39:28 +03:00
Vitaliy Filippov e9d053e30f Support --io option for vitastor-disk dump-journal/write-journal 2026-06-17 00:39:28 +03:00
Vitaliy Filippov 1be51f903c Check entry sizes in blockstore_heap during loading 2026-06-16 20:34:52 +03:00
Vitaliy Filippov cd51f14a90 Fix incorrect chained_read bitmap recovery 2026-06-15 21:10:44 +03:00
Vitaliy Filippov 9b8107875f Add a regression test for incorrect chained_read bitmap recovery 2026-06-15 21:10:44 +03:00
Vitaliy Filippov ca606570f7 Add request size validation 2026-06-15 01:56:54 +03:00
Vitaliy Filippov 22d094ccc6 Add a regression test to check that parity-less EC writes do not destroy bitmaps 2026-06-15 01:56:54 +03:00
Vitaliy Filippov fd84d84279 Add a regression test for scrub bitmap comparison (EC 3+3, only chunk 1 written and lost) 2026-06-15 01:52:04 +03:00
Vitaliy Filippov af2b1e28e3 Add a regression test for EC bitmap recovery losing a parity chunk 2026-06-15 01:52:04 +03:00
Vitaliy Filippov 9dda449f48 Fix fully-degraded EC writes destroying bitmaps 2026-06-15 01:52:04 +03:00
Vitaliy Filippov e6d4b32629 Also check padded small_write 2026-06-15 01:31:19 +03:00
Vitaliy Filippov 4de22a08e2 Fix partial padded read checksum verification 2026-06-15 01:31:19 +03:00
Vitaliy Filippov a403de46b3 Test partial padded read 2026-06-15 01:31:19 +03:00
Vitaliy Filippov ac20f605f6 Fix scrub bitmap comparison 2026-06-15 01:31:19 +03:00
Vitaliy Filippov 51ecbadb12 Only update bitmaps when writing data in primary subops
Fixes fully degraded EC writes and recovering EC writes corrupting bitmaps
2026-06-15 01:31:19 +03:00
Vitaliy Filippov 6a4627b625 Write a test for store v1 & journal corruption preservation, fix MULTIPLE bugs 2026-06-14 11:23:36 +03:00
Vitaliy Filippov fd2b8b8792 Fix ec_check_combination more correctly (fixes osd_rmw_test_je) 2026-06-13 19:56:06 +03:00
Vitaliy Filippov f3d662bac7 Verify bitmaps during scrub 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 553cc8ef87 Add a test for replicated bitmap scrub 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 67fdf1142b Fix vitastor-disk crash when converting from 0.5.x metadata 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 02f6e564a6 Old store - write header on init only after clearing metadata 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 33d14061d6 New store - write header on init only after clearing metadata 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 677e755e4e Replace VLA with a vector and also fix invalid dangling pointer warnings 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 11a972cbfb Delete pg.peering_state when it is not needed 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 1834743a0e Fix incorrect clearing of LOC_CORRUPTED on the second scrub 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 213f76c66c Add a regression test for LOC_CORRUPTED cleared on second scrub 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 91698404a7 Add a basic OSD test as an example 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 27bd38d95e Allow to create OSD with mocked blockstore and network 2026-06-13 19:56:06 +03:00
Vitaliy Filippov ef0e61be1b Split and mock etcd_state_client_t for testing 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 26fb08d7da Change st_cli to pointer 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 80fa3094b3 Fix cpp-btree disabling asserts everywhere it is included to! 2026-06-13 19:56:06 +03:00
Vitaliy Filippov df931b1e17 Check for short reads in blockstore init 2026-06-13 19:56:06 +03:00
Vitaliy Filippov 906294ae9a Fix ec_check_combination() short tmp_buf allocation 2026-06-13 19:56:05 +03:00
Vitaliy Filippov 15f69719e4 Not an actual bug, clean up fsync conditions for clarity
It could be a bug if data_fd could be equal to journal_fd but not to meta_fd,
but it can't.
2026-06-13 19:55:47 +03:00
Vitaliy Filippov 43aa4cfff6 Fix incorrect deferred freeing of block used by a parallel read in the old store 2026-06-13 19:55:47 +03:00
Vitaliy Filippov 6901227390 Fix cached EC decoding of multiple stripes with ISA-L 2026-06-10 02:07:58 +03:00
Vitaliy Filippov 7f718feaf6 Fix alloc in nfs_portmap 2026-06-10 01:02:30 +03:00
Vitaliy Filippov 236ffbb24e Fix multilist_alloc_t bug (not triggerable in real operation but still a bug) 2026-06-10 01:01:20 +03:00
Vitaliy Filippov 0e300f4c50 Fix incorrect rounding in vitastor-disk trim when --discard_granularity option is passed 2026-06-10 00:38:34 +03:00
Vitaliy Filippov 6d82a3daa3 Fix fill_block_empty_space argument type (ui32 -> ui64) 2026-06-10 00:33:31 +03:00
Vitaliy Filippov c0c01a8e57 Fix writeback detection in ublk server for --image mode 2026-06-10 00:31:48 +03:00
Vitaliy Filippov 334755e912 Fix vitastor-disk resize to smaller size clearing all data O_o, add a test for it 2026-06-10 00:30:42 +03:00
Vitaliy Filippov c16f955a51 Limit the amount of incoming data for NFS clients to prevent choking on memory 2026-06-06 13:56:20 +03:00
Vitaliy Filippov c1dc14f5ee Fix old store no_inode_stats not working 2026-06-05 00:50:53 +03:00
Vitaliy Filippov ec6a70bbd3 Release 3.0.13
- New store fixes:
  - Fix repeated rollback logic
  - Fix crash on rolled back object compaction
  - Fix postpone_load possibly merging different object chains
  - Fix block_csums import in vitastor-disk write-meta
  - Fix header checksum after vitastor-disk write-meta
- Old store fixes:
  - Fix batched fsync possibly skipped by some flush coroutines
- Improve ENOSPC test, fix possible crash on ENOSPC
- Add fsyncs to vitastor-disk prepare
- Fix possible crash on pg_lock check failure in sec_read_bmp
- Fix VitastorFS initialization when local_reads are enabled
2026-05-31 12:22:43 +03:00
Vitaliy Filippov f236ed895a Rename parameter to reflect actual semantics 2026-05-31 12:03:49 +03:00
Vitaliy Filippov 7d70c90196 Save osd_num for locally submitted writes for mark_partial_write (still needs osd unit tests :)) 2026-05-31 11:47:48 +03:00
Vitaliy Filippov 0a04490043 Fix repeated rollbacks in bs_heap 2026-05-31 11:43:56 +03:00
Vitaliy Filippov dce7ffde6f Fix compaction with do_delete 2026-05-31 11:27:19 +03:00
Vitaliy Filippov f6bd1ff0e5 Fix postpone_load in the new blockstore 2026-05-31 10:52:11 +03:00
Vitaliy Filippov ac00a06757 Make fsync batch members actually wait for fsync completion (found by kimi k2.6) 2026-05-30 16:38:02 +03:00
Vitaliy Filippov 155cfb3c73 Add fsyncs to vitastor-disk prepare (cosmetic) 2026-05-30 16:16:31 +03:00
Vitaliy Filippov 126891126a Do not use unneeded uint64 -> unsigned conversion 2026-05-30 16:14:01 +03:00
Vitaliy Filippov 547a394be6 Fix another unused piece of code 2026-05-30 16:09:48 +03:00
Vitaliy Filippov 1a511acead Do not ignore nfs_do_fsync result 2026-05-30 15:58:46 +03:00