[sheepdog] [PATCH 2/2] plain store: refactor default_get_hash

MORITA Kazutaka morita.kazutaka at gmail.com
Mon May 20 19:14:06 CEST 2013


>  
> +static int get_object_path(uint64_t oid, uint32_t epoch, char *path)
> +{
> +	if (default_exist(oid))
> +		get_obj_path(oid, path);
> +	else
> +		get_stale_obj_path(oid, epoch, path);
> +
> +	if (access(path, F_OK) < 0) {
> +		if (errno == ENOENT)
> +			return SD_RES_NO_OBJ;
> +		return SD_RES_EIO;
> +	}

We already called access/2 in default_exit() and confirmed that the path exists
in the case of get_obj_path() is used.  I think this check is necessary only
when we use get_stale_obj_path().

Thanks,

Kazutaka



More information about the sheepdog mailing list