[LU-3016] The errno for symlink() on Lustre is different from it on ext3 or NFS Created: 22/Mar/13  Updated: 08/Apr/13

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Hideki Mizuno Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: mq313

Severity: 3
Rank (Obsolete): 7337

 Description   

I'm a developer of Fujitsu customized Lustre, named FEFS.

I found a problem in Lustre-2.3.x.
If the C program like below is executed on ext3 or NFS, the errno for symlink() is EEXIST(17).
However, on Lustre-2.3.x, it is ENOENT(2).
The problem is that the errno for symlink() on Lustre is different from it on ext3 or NFS.
The problem was found, because the "test-symlink" was FAIL in "make check" of the GNU Core Utilities (http://www.gnu.org/software/coreutils/) on FEFS.

#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>

int main (){
  int ret;

  mkdir("test-symlink.tdir", 0700);
  ret = symlink("nowhere", "test-symlink.tdir/");
  fprintf(stderr, "ret=%d, errno=%d, errstr=%s\n", ret, errno, strerror(errno));
  return 0;
}

I found, if the patch of Bug 18534 like below was backed out, the problem would be fixed.
The patch of Bug 18534 is to avoid extra unnecessary lookup in case of mkdir/mknod and perhaps others.
http://git.whamcloud.com/gitweb?p=fs/lustre-release.git;a=commit;h=cabdb5633edaf7f997d422563d6b4d320db65cbd

However, I'm not sure that backing out the patch of Bug 18534 doesn't matter.
So could someone help me with it?


Generated at Sat Feb 10 01:30:14 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.