mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Adrian Hunter <ext-adrian.hunter@nokia.com>
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: Mon, 2 Jun 2008 10:14:28 +0200	[thread overview]
Message-ID: <20080602081428.GA30613@duck.suse.cz> (raw)
In-Reply-To: <483FDDA9.4020401@nokia.com>

On Fri 30-05-08 13:57:45, Adrian Hunter wrote:
> 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."
  This is exactly what I meant. Maybe phrased it wrongly in my email :)

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      reply	other threads:[~2008-06-02  8:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26 13:53 Artem Bityutskiy
2008-05-28 15:45 ` Jan Kara
2008-05-30 10:57   ` Adrian Hunter
2008-06-02  8:14     ` Jan Kara [this message]

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=20080602081428.GA30613@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=dwmw2@infradead.org \
    --cc=ext-adrian.hunter@nokia.com \
    --cc=hch@infradead.org \
    --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

all inboxes | Powered by JetHome®