diff options
Diffstat (limited to 'heal')
| -rw-r--r-- | heal/src/glfs-heal.c | 40 | 
1 files changed, 2 insertions, 38 deletions
diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index 3ea3f430e3b..7e8673a65ac 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -16,6 +16,7 @@  #include "glfs-internal.h"  #include "protocol-common.h"  #include "syncop.h" +#include "syncop-utils.h"  #include <string.h>  #include <time.h> @@ -124,43 +125,6 @@ glfsh_index_purge (xlator_t *subvol, inode_t *inode, char *name)          return ret;  } -int -glfsh_gfid_to_path (xlator_t *this, xlator_t *subvol, uuid_t gfid, char **path_p) -{ -        int      ret   = 0; -        char    *path  = NULL; -        loc_t    loc   = {0,}; -        dict_t  *xattr = NULL; - -        uuid_copy (loc.gfid, gfid); -        loc.inode = inode_new (this->itable); - -        ret = syncop_getxattr (subvol, &loc, &xattr, GFID_TO_PATH_KEY, NULL); -        if (ret) -                goto out; - -        ret = dict_get_str (xattr, GFID_TO_PATH_KEY, &path); -        if (ret || !path) { -                ret = -EINVAL; -                goto out; -        } - -        *path_p = gf_strdup (path); -        if (!*path_p) { -                ret = -ENOMEM; -                goto out; -        } - -        ret = 0; - -out: -        if (xattr) -                dict_unref (xattr); -        loc_wipe (&loc); - -        return ret; -} -  void  glfsh_print_spb_status (dict_t *dict, char *path, uuid_t gfid,                          uint64_t *num_entries) @@ -275,7 +239,7 @@ glfsh_process_entries (xlator_t *xl, fd_t *fd, gf_dirent_t *entries,                  if (ret)                          continue; -                ret = glfsh_gfid_to_path (this, xl, gfid, &path); +                ret = syncop_gfid_to_path (this->itable, xl, gfid, &path);                  if (ret == -ENOENT || ret == -ESTALE) {                          glfsh_index_purge (xl, fd->inode, entry->d_name);  | 
