Blame source/vdo/base/vdoRecovery.h

Packit Service 75d76b
/*
Packit Service 75d76b
 * Copyright (c) 2020 Red Hat, Inc.
Packit Service 75d76b
 *
Packit Service 75d76b
 * This program is free software; you can redistribute it and/or
Packit Service 75d76b
 * modify it under the terms of the GNU General Public License
Packit Service 75d76b
 * as published by the Free Software Foundation; either version 2
Packit Service 75d76b
 * of the License, or (at your option) any later version.
Packit Service 75d76b
 * 
Packit Service 75d76b
 * This program is distributed in the hope that it will be useful,
Packit Service 75d76b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 75d76b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 75d76b
 * GNU General Public License for more details.
Packit Service 75d76b
 * 
Packit Service 75d76b
 * You should have received a copy of the GNU General Public License
Packit Service 75d76b
 * along with this program; if not, write to the Free Software
Packit Service 75d76b
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit Service 75d76b
 * 02110-1301, USA. 
Packit Service 75d76b
 *
Packit Service 75d76b
 * $Id: //eng/vdo-releases/aluminum/src/c++/vdo/base/vdoRecovery.h#2 $
Packit Service 75d76b
 */
Packit Service 75d76b
Packit Service 75d76b
#ifndef VDO_RECOVERY_H
Packit Service 75d76b
#define VDO_RECOVERY_H
Packit Service 75d76b
Packit Service 75d76b
#include "completion.h"
Packit Service 75d76b
#include "vdo.h"
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Replay recovery journal entries in the the slab journals of slabs owned by a
Packit Service 75d76b
 * given BlockAllocator.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param allocator   The allocator whose slab journals are to be recovered
Packit Service 75d76b
 * @param completion  The completion to use for waiting on slab journal space
Packit Service 75d76b
 * @param context     The slab depot load context supplied by a recovery when
Packit Service 75d76b
 *                    it loads the depot
Packit Service 75d76b
 **/
Packit Service 75d76b
void replayIntoSlabJournals(BlockAllocator *allocator,
Packit Service 75d76b
                            VDOCompletion  *completion,
Packit Service 75d76b
                            void           *context);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Construct a recovery completion and launch it. Apply all valid journal block
Packit Service 75d76b
 * entries to all VDO structures. This function performs the offline portion of
Packit Service 75d76b
 * recovering a VDO from a crash.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param vdo     The vdo to recover
Packit Service 75d76b
 * @param parent  The completion to notify when the offline portion of the
Packit Service 75d76b
 *                recovery is complete
Packit Service 75d76b
 **/
Packit Service 75d76b
void launchRecovery(VDO *vdo, VDOCompletion *parent);
Packit Service 75d76b
Packit Service 75d76b
#endif // VDO_RECOVERY_H