[Gluster-devel] doubts in posix_handle_path and posix_handle_pump
Pranith Kumar Karampuri
pkarampu at redhat.com
Mon Jun 2 06:00:30 UTC 2014
hi Avati,
Could you please explain why posix_handle_pump fixes ELOOP.
posix_handle_path seems to return gfid-path when the lstat on the base-gfid path fails. I am not sure what the behaviour is supposed to be.
I added the snippet of code for reference below.
346 base_len = (priv->base_path_length + SLEN(GF_HIDDEN_PATH) + 45);
347 base_str = alloca (base_len + 1);
348 base_len = snprintf (base_str, base_len + 1, "%s/%s/%02x/%02x/%s",
349 priv->base_path, GF_HIDDEN_PATH, gfid[0], gfid[1],
350 uuid_str);
351
352 pfx_len = priv->base_path_length + 1 + SLEN(GF_HIDDEN_PATH) + 1;
353
354 if (basename) {
355 len = snprintf (buf, maxlen, "%s/%s", base_str, basename);
356 } else {
357 len = snprintf (buf, maxlen, "%s", base_str);
358 }
359
360 ret = lstat (base_str, &stat);
361
362 if (!(ret == 0 && S_ISLNK(stat.st_mode) && stat.st_nlink == 1)) <<<-----
363 goto out;
Pranith.
More information about the Gluster-devel
mailing list