Re: How to fix wrong telldir/seekdir usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pranith Kumar Karampuri <pkarampu@xxxxxxxxxx> wrote:

> I believe posix xlator doesn't have this problem for 
> non-anonymous fds where the DIR* stream is open till the final unref on
> the fd.

You must be right since reading a directory in a glusterfs volume does
not cause an infinite loop on NetBSD [1]. A quick inspection in the code
seems to suggest that we only have opendir/readdir/closedir in the same
function, and the opendir in posix_opendir.

snapview-server seems to suffer the same problem as index, though.

[1] reusing for seekdir() an offset obtained by telldir() on another DIR
* is unspecified. On Linux it seems to work (without any guarantee it is
reliable) NetBSD it is nilpotent, which cause readdir() to always
restart at the beginning of the directory.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@xxxxxxxxxx
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://supercolony.gluster.org/mailman/listinfo/gluster-devel




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux