Re: readdir() harmful in threaded code

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

 



Pranith Kumar Karampuri <pkarampu@xxxxxxxxxx> wrote:

> So should we do readdir() with external locks for everything instead?

readdir() with a per-directory lock is safe. However, it may come with a
performance hit in some scenarios, since two threads cannot read the
same directory at once. But I am not sure it can happen in GlusterFS.

I am a bit disturbed by readdir_r() being planned for deprecation. The
Open Group does not say that, or I missed it:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@xxxxxxxxxx
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.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