Fix offline extents not being able to be created.

While online extents (non-zero size) worked just fine with this
code, the offline extent code inserted a btree item without the
appropriate key, which results in duplicate (null) keys being
inserted, hence the "duplicate" error.

All that is needed to fix is to put the created key in the btree
item to be inserted.

Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
Auke Kok
2024-04-17 13:11:15 -04:00
parent 5316905d12
commit 60e14e20dc
+1
View File
@@ -522,6 +522,7 @@ static spr_err_t insert_extent_item(struct scoutfs_parallel_restore_writer *wri,
err = bti_alloc(sizeof(struct scoutfs_data_extent_val), &bti);
if (!err) {
bti->key = key;
dv = bti->val;
dv->blkno = 0;
dv->flags = SEF_OFFLINE;