Skip to content

Commit 787007c

Browse files
Revert "do not allow parallel flushing of snapshot md clusters since both md types are implicitly in linked list format"
This reverts commit acdd73e.
1 parent acdd73e commit 787007c

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

lib/blob/blobstore.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -14102,8 +14102,7 @@ blob_search_for_new_flush_job(struct spdk_blob *blob, struct t_flush_job *job) {
1410214102
++blob->current_array_ordinal;
1410314103
blob->next_idx_in_array = blob->active.extent_pages_array_size - 1; // next array is extent pages array
1410414104
}
14105-
} else if (blob->current_array_ordinal <= 2 && blob->nflush_jobs_current == 0) // no parallelism allowed on md
14106-
{
14105+
} else if (blob->current_array_ordinal <= 2) {
1410714106
job->is_md_job = true;
1410814107

1410914108
uint32_t *page_idxs_arr = blob->current_array_ordinal == 1 ? blob->active.extent_pages : blob->active.pages;
@@ -14128,10 +14127,6 @@ blob_search_for_new_flush_job(struct spdk_blob *blob, struct t_flush_job *job) {
1412814127
++blob->current_array_ordinal;
1412914128
blob->next_idx_in_array = blob->active.num_pages - 1; // next array after extent pages array is pages array
1413014129
}
14131-
} else if (job->buf) // job will never be done again, free its buffer to save memory
14132-
{
14133-
spdk_free(job->buf);
14134-
job->buf = NULL;
1413514130
}
1413614131
}
1413714132
return 0;

lib/blob/blobstore.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ struct spdk_blob {
204204
are on the same array to safely flush data before metadata and less
205205
sensitive metadata before other metadata.
206206
207-
However, extent pages and md pages are implicitly ordered like a linked list, so
208-
we must flush them one md cluster at a time in reverse order.
207+
However, the very first non-extent page must be the last md page to be flushed.
208+
For convenience sake, we'll just flush both types of md pages in reverse order.
209209
*/
210210
uint64_t next_idx_in_array;
211211

0 commit comments

Comments
 (0)