[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080602081428.GA30613@duck.suse.cz>
Date: Mon, 2 Jun 2008 10:14:28 +0200
From: Jan Kara <jack@...e.cz>
To: Adrian Hunter <ext-adrian.hunter@...ia.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>,
Christoph Hellwig <hch@...radead.org>,
David Woodhouse <dwmw2@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: UBIFS seekdir()/telldir() issue
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@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists