Hide Forgot
Description of problem: If user tries to create directory named .glusterfs, currently ENODATA (No data available) is returned which is not so correct when we can return more meaning full Error Codes, like EPERM (Operation Not Permitted) or EACCES (Permission Denied) or else EEXIST (file exists) Version-Release number of selected component (if applicable): glusterfs-3.3.0qa21 How reproducible: always Steps to Reproduce: 1. Run mkdir .glusterfs on mountpoint. Actual results: [root@RHEL6 mnt]# mkdir .glusterfs mkdir: cannot create directory `.glusterfs': No data available Expected results: Error code should be more meaningful, like EPERM or EACCES or EEXIST
Is a known issue for now, we need to document it, after fixing the exact error code.
Avati, what do you think should be the standard error for this ? Helps for documentation if we have single error for this case.
Kaushal. Can you please send out op_errno=EEXIST upon encountering this mkdir?
In master, right now we get EPERM as errno on the lookup perfomed before mkdir. This is set by posix_lookup(). Is this enough or is it needed to have a safegaurd in posix_mkdir() as well?
Can you just make sure to return the same errno in posix_mkdir() too? That would make it clean. Vijay/Avati, any thoughts?
CHANGE: http://review.gluster.com/3200 (storage/posix: Don't allow mkdir() on HIDDEN_DIRECTORY) merged in master by Vijay Bellur (vijay)
With glusterfs-3.3.0qa40 I get EPERM (Operation not permitted). Is this the errno to be returned or EEXIST?
We want to tell user that you don't have Permission to create (ie, EPERM), hence its fine.
Then moving it to closed upstream.