Ejemplo n.º 1
0
int
nfs_loc_copy (loc_t *dst, loc_t *src)
{
        int  ret = -1;

        ret = loc_copy (dst, src);

        return ret;
}
Ejemplo n.º 2
0
void
afr_build_parent_loc (loc_t *parent, loc_t *child)
{
	char *tmp = NULL;

	if (!child->parent) {
		loc_copy (parent, child);
		return;
	}

	tmp = gf_strdup (child->path);
	parent->path   = gf_strdup (dirname (tmp));
	GF_FREE (tmp);

        parent->name   = strrchr (parent->path, '/');
	if (parent->name)
		parent->name++;

	parent->inode  = inode_ref (child->parent);
	parent->parent = inode_parent (parent->inode, 0, NULL);
	parent->ino    = parent->inode->ino;
}
Ejemplo n.º 3
0
#include "gfid-access.h"
#include "inode.h"
#include "byte-order.h"
#include "statedump.h"


int
ga_valid_inode_loc_copy (loc_t *dst, loc_t *src, xlator_t *this)
{
        int      ret        = 0;
        uint64_t value      = 0;

        /* if its an entry operation, on the virtual */
        /* directory inode as parent, we need to handle */
        /* it properly */
        ret = loc_copy (dst, src);
        if (ret < 0)
                goto out;

        /*
         * Change ALL virtual inodes with real-inodes in loc
         */
        if (dst->parent) {
                ret = inode_ctx_get (dst->parent, this, &value);
                if (ret < 0) {
                        ret = 0; //real-inode
                        goto out;
                }
                inode_unref (dst->parent);
                dst->parent = inode_ref ((inode_t*)value);
                uuid_copy (dst->pargfid, dst->parent->gfid);