[Question] Behaviour of directory listing in XFS with concurrent deletes

Vairavanathan, Emalayan
2018-04-06T00:02:43Z

Hi There,

We have an application that iterates through a large directory (that has around 1.2 million files) and lists the names of all the files in the directory.

Files stored in the directory could be concurrently deleted by another thread in the application while the application lists the files.

Our application can tolerate false positives when listing a directory. However false negatives in directory listing *cannot* be tolerated.

To this end could someone tell me how directory listing in XFS behaves with concurrent deletes? Is it possible to see false negatives ?

Thank you
Emalayan