From: Barry Naujok Date: Wed, 15 Aug 2007 04:14:22 +0000 (+0000) Subject: Fix up AG queuing order in phase 4 X-Git-Tag: v2.10.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af2984c925216969bafb0ae2659778c36e761d16;p=thirdparty%2Fxfsprogs-dev.git Fix up AG queuing order in phase 4 Merge of master-melb:xfs-cmds:29388a by kenmcd. Fix up AG queuing order for prefetch in phase 4 --- diff --git a/repair/phase4.c b/repair/phase4.c index 44bbac314..09353b75a 100644 --- a/repair/phase4.c +++ b/repair/phase4.c @@ -137,6 +137,7 @@ process_ags( xfs_mount_t *mp) { int i, j; + xfs_agnumber_t agno; work_queue_t *queues; prefetch_args_t *pf_args[2]; @@ -153,12 +154,13 @@ process_ags( /* * create one worker thread for each segment of the volume */ - for (i = 0; i < thread_count; i++) { + for (i = 0, agno = 0; i < thread_count; i++) { create_work_queue(&queues[i], mp, 1); pf_args[0] = NULL; - for (j = i; j < mp->m_sb.sb_agcount; j += ag_stride) { - pf_args[0] = start_inode_prefetch(j, 0, pf_args[0]); - queue_work(&queues[i], process_ag_func, j, pf_args[0]); + for (j = 0; j < ag_stride && agno < mp->m_sb.sb_agcount; + j++, agno++) { + pf_args[0] = start_inode_prefetch(agno, 0, pf_args[0]); + queue_work(&queues[i], process_ag_func, agno, pf_args[0]); } } /*