From: Adrian Hunter <ext-adrian.hunter@nokia.com>
To: Jan Kara <jack@suse.cz>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
Christoph Hellwig <hch@infradead.org>,
David Woodhouse <dwmw2@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: UBIFS seekdir()/telldir() issue
Date: Fri, 30 May 2008 13:57:45 +0300 [thread overview]
Message-ID: <483FDDA9.4020401@nokia.com> (raw)
In-Reply-To: <20080528154525.GA32634@atrey.karlin.mff.cuni.cz>
Jan Kara wrote:
> The sequence you write above is actually incorrect I think. Noone
> guarantees that the cookie returned by telldir() is valid after
> closedir(). What is a bigger (and quite common) problem is, if somebody
> uses readdir/telldir/seekdir while someone else creates/deletes files in
> the directory. The standard implies in this case that subsequent
> readdir should return all the files which were not touched (or all files
> after position set by seekdir if used...).
Not according to this:
http://www.opengroup.org/onlinepubs/009695399/functions/readdir.html
"If a file is removed from or added to the directory after the
most recent call to opendir() or rewinddir(), whether a
subsequent call to readdir() returns an entry for that file
is unspecified."
next prev parent reply other threads:[~2008-05-30 11:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 13:53 UBIFS seekdir()/telldir() issue Artem Bityutskiy
2008-05-28 15:45 ` Jan Kara
2008-05-30 10:57 ` Adrian Hunter [this message]
2008-06-02 8:14 ` Jan Kara
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=483FDDA9.4020401@nokia.com \
--to=ext-adrian.hunter@nokia.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=dwmw2@infradead.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-kernel@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