Commit 642a9db7 authored by Shane Snyder's avatar Shane Snyder
Browse files

bug fix in lustre module sort

parent ec0fcc53
...@@ -293,8 +293,8 @@ static void lustre_set_rec_ref_pointers(void *rec_ref_p) ...@@ -293,8 +293,8 @@ static void lustre_set_rec_ref_pointers(void *rec_ref_p)
/* compare function for sorting file records by descending rank */ /* compare function for sorting file records by descending rank */
static int lustre_record_compare(const void* a_p, const void* b_p) static int lustre_record_compare(const void* a_p, const void* b_p)
{ {
const struct lustre_record_ref* a = a_p; const struct lustre_record_ref* a = *((struct lustre_record_ref **)a_p);
const struct lustre_record_ref* b = b_p; const struct lustre_record_ref* b = *((struct lustre_record_ref **)b_p);
if (a->record->base_rec.rank < b->record->base_rec.rank) if (a->record->base_rec.rank < b->record->base_rec.rank)
return 1; return 1;
...@@ -358,7 +358,7 @@ int sort_lustre_records() ...@@ -358,7 +358,7 @@ int sort_lustre_records()
qsort( qsort(
lustre_runtime->record_ref_array, lustre_runtime->record_ref_array,
lustre_runtime->record_count, lustre_runtime->record_count,
sizeof(struct lustre_record_ref), sizeof(struct lustre_record_ref *),
lustre_record_compare lustre_record_compare
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment