From: Dave Chinner <david@fromorbit.com>
To: "Vairavanathan, Emalayan" <Emalayan.Vairavanathan@netapp.com>
Cc: "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: [Question] Behaviour of directory listing in XFS with concurrent deletes
Date: Fri, 6 Apr 2018 11:18:08 +1000 [thread overview]
Message-ID: <20180406011808.GQ23861@dastard> (raw)
In-Reply-To: <BLUPR0601MB0929603CF85A26259FA94D32F1BB0@BLUPR0601MB0929.namprd06.prod.outlook.com>
On Thu, Apr 05, 2018 at 11:53:18PM +0000, Vairavanathan, Emalayan wrote:
> 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.
XFS complies with Posix requirements for stable directory offsets.
i.e. that dirents don't change offset when other dirents are added
or removed. Hence sequential readdir calls will always start off at
the dirent offset the last call finished at.
However, this guarantees nothing about individual dirent state
when concurrent modifications occur between readdir calls.
> 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 ?
What's does "false-negative" mean? I don't know what your
application is trying to do, so I don't know what your failure
criteria is....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-04-06 1:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 23:53 [Question] Behaviour of directory listing in XFS with concurrent deletes Vairavanathan, Emalayan
2018-04-06 1:18 ` Dave Chinner [this message]
2018-04-10 0:24 ` Vairavanathan, Emalayan
2018-04-10 9:20 ` Dave Chinner
2018-04-10 20:10 ` Vairavanathan, Emalayan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180406011808.GQ23861@dastard \
--to=david@fromorbit.com \
--cc=Emalayan.Vairavanathan@netapp.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox