mirror of
https://github.com/versity/scoutfs.git
synced 2025-12-23 13:35:18 +00:00
Corretly wait on submitted segment reads
The segment waiting loop was rewritten to use n to iterate up to i, but the body of the loop still had i. Take that as a signal to Always Iterate With 'i' and store the last i and then iterate towards it with i again. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -295,6 +295,7 @@ int scoutfs_manifest_read_items(struct super_block *sb, struct kvec *key)
|
||||
int err;
|
||||
int nr_refs;
|
||||
int cmp;
|
||||
int last;
|
||||
int i;
|
||||
int n;
|
||||
|
||||
@@ -314,9 +315,10 @@ int scoutfs_manifest_read_items(struct super_block *sb, struct kvec *key)
|
||||
|
||||
refs[i].seg = seg;
|
||||
}
|
||||
last = i;
|
||||
|
||||
/* wait for submitted segments and search if we haven't seen failure */
|
||||
for (n = 0; n < i; n++) {
|
||||
for (i = 0; i < last; i++) {
|
||||
seg = refs[i].seg;
|
||||
|
||||
err = scoutfs_seg_wait(sb, seg);
|
||||
|
||||
Reference in New Issue
Block a user