Exemplo n.º 1
0
/*
 * lane_need_recovery_alloc -- return 1 if allocator's section needs recovery
 */
static int
lane_need_recovery_alloc(struct pmem_info *pip,
		struct lane_section_layout *layout)
{
	struct allocator_lane_section *section =
		(struct allocator_lane_section *)layout;

	/* there is just a redo log */
	return lane_need_recovery_redo(&section->redo[0], REDO_LOG_SIZE);
}
Exemplo n.º 2
0
/*
 * lane_need_recovery_list -- return 1 if list's section needs recovery
 */
static int
lane_need_recovery_list(struct pmem_info *pip,
	struct lane_section_layout *layout)
{
	struct lane_list_section *section = (struct lane_list_section *)layout;

	/*
	 * The list section needs recovery if redo log needs recovery or
	 * object's offset or size are nonzero.
	 */
	return lane_need_recovery_redo(&section->redo[0], REDO_NUM_ENTRIES) ||
		section->obj_offset;
}