Re: [RFC,PATCH] libfs dcache_readdir() and dcache_dir_lseek() bugfix

From: Jörn Engel
Date: Fri Nov 04 2005 - 10:16:58 EST


On Fri, 4 November 2005 16:11:04 +0100, jblunck@xxxxxxx wrote:
>
> True. Seeking to that offset should at least fail and shouldn't stop at the
> new entry. But SuSV3 says that the offset given by telldir() is valid until
> the next rewinddir(). This is no problem for directories that can only grow.
> I tried to implement some kind of deferred dput'ing of the d_child's but that
> was too hackish and was wasting memory. So the best thing I can do now is fail
> if someone wants to seek to an offset of an already unlinked file.

Does that mean that, to satisfy the standard, you'd have to allow the
seek, but return 0 bytes on further reads, as you're already at (or
beyond, whatever) EOF?

Sounds quite ugly and it would be nice if this wasn't necessary.

Jörn

--
When people work hard for you for a pat on the back, you've got
to give them that pat.
-- Robert Heinlein
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/