Exemple #1
0
static int farm_purge_obj(void)
{
	if (cleanup_working_dir() < 0)
		return SD_RES_EIO;
	trunk_reset();

	return SD_RES_SUCCESS;
}
Exemple #2
0
static int farm_restore(struct siocb *iocb)
{
    int ret = SD_RES_EIO, epoch = iocb->epoch;

    dprintf("try recover user epoch %d\n", epoch);

    if (cleanup_working_dir() < 0) {
        eprintf("failed to clean up the working dir %m\n");
        goto out;
    }

    ret = restore_objects_from_snap(epoch);
    if (ret != SD_RES_SUCCESS)
        goto out;
out:
    return ret;
}