In lipe posix scan function, there is a queue to save
directories to be scanned. If we put the new entries into the
tail and get entries from the head, it's an approximate
Breadth-First-Search. But if we put the new entries into the
head and get entries from the head too, it's an approximate
Depth-First-Search. DFS is better to save memory of queue
and can get file ASAP.
Change-Id: Ief32cf9cea42ba35c90084ee500a0801cc8396aa
Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Reviewed-on: https://review.whamcloud.com/43381
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
if (ginfo->gi_work_number <= ginfo->gi_num_threads)
posix_scan_add_global_work(ginfo, work);
else
- lipe_list_add_tail(&work->psw_linkage, local_queue);
+ lipe_list_add(&work->psw_linkage, local_queue);
return 0;
}