From 60e14e20dcef25cf7c44aeada5d839e8f527f1bd Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 17 Apr 2024 13:11:15 -0400 Subject: [PATCH] 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 --- utils/src/parallel_restore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/src/parallel_restore.c b/utils/src/parallel_restore.c index 2e411ec9..813a7e8b 100644 --- a/utils/src/parallel_restore.c +++ b/utils/src/parallel_restore.c @@ -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;