Emmanuel Dreyfus <manu@xxxxxxxxxx> wrote: > It seems posix_handle_mkdir_hashes() attempts to mkdir two directories > at once: ec/ec2. How is it supposed to work? Should parent directory be > created somewhere else? This fixes the problem. Any comment? --- xlators/storage/posix/src/posix-handle.c.orig +++ xlators/storage/posix/src/posix-handle.c @@ -405,8 +405,16 @@ parpath = dirname (duppath); parpath = dirname (duppath); ret = mkdir (parpath, 0700); + if (ret == -1 && errno == ENOENT) { + char *tmppath = NULL; + + tmppath = strdupa(parpath); + ret = mkdir (dirname (tmppath), 0700); + if (ret == 0) + ret = mkdir (parpath, 0700); + } if (ret == -1 && errno != EEXIST) { gf_log (this->name, GF_LOG_ERROR, "error mkdir hash-1 %s (%s)", parpath, strerror (errno)); -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz manu@xxxxxxxxxx