[Bugs] [Bug 1196019] New: Any op on files in the root directory of the volume fails unless absolute path is specified.

bugzilla at redhat.com bugzilla at redhat.com
Wed Feb 25 05:42:33 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1196019

            Bug ID: 1196019
           Summary: Any op on files in the root directory of the volume
                    fails unless absolute path is specified.
           Product: GlusterFS
           Version: pre-release
         Component: libgfapi
          Severity: high
          Assignee: bugs at gluster.org
          Reporter: pgurusid at redhat.com
        QA Contact: sdharane at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com



Description of problem:
If a test case is as follows: 
....
fs = glfs_init();
....
glfs_mkdir(fs, "dir1", 0755); /* dir1 being relative to the root of the
volume*/
...
glfs_fini();

The above test case fails for the below reason:

glfs_init() does not set the cwd to be "/", Hence with this patch the
expectation would be that the path should be absolute always for a file
directory under "/". i.e. the below statement succeeds:
    glfs_mkdir (fs, "/dir1", 0755);
Expecting absolute patch for any file directly under "/", may break the
existing users.

Two possible fixes:

In glfs_init(), set fs->cwd to "/", not sure if there can be other cases where
it can be unset.
In glfs_resolve_path() even if glfs_cwd_get() returns NULL, call
priv_glfs_resolve_at() as it handles that case.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list