Whamcloud - gitweb
EX-3051 lipe: posix scan in DFS way
authorLei Feng <flei@whamcloud.com>
Wed, 21 Apr 2021 01:30:59 +0000 (09:30 +0800)
committerLi Xi <lixi@ddn.com>
Sun, 1 Aug 2021 02:02:31 +0000 (02:02 +0000)
commite3cc4f8216e36bd9defff0db22504d4d8f75a03b
tree37dfd04f42389f53b47e8303489f6010fbebdeba
parent0790e60f0881f7e43923025dd0b3ad645418743e
EX-3051 lipe: posix scan in DFS way

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>
lipe/src/posix.c