|
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/slabScrubberInternals.h#5 $
|
|
Packit Service |
75d76b |
*/
|
|
Packit Service |
75d76b |
|
|
Packit Service |
75d76b |
#ifndef SLAB_SCRUBBER_INTERNALS_H
|
|
Packit Service |
75d76b |
#define SLAB_SCRUBBER_INTERNALS_H
|
|
Packit Service |
75d76b |
|
|
Packit Service |
75d76b |
#include "slabScrubber.h"
|
|
Packit Service |
75d76b |
|
|
Packit Service |
75d76b |
#include "adminState.h"
|
|
Packit Service |
75d76b |
#include "atomic.h"
|
|
Packit Service |
75d76b |
#include "extent.h"
|
|
Packit Service |
75d76b |
#include "ringNode.h"
|
|
Packit Service |
75d76b |
|
|
Packit Service |
75d76b |
struct slabScrubber {
|
|
Packit Service |
75d76b |
VDOCompletion completion;
|
|
Packit Service |
75d76b |
/** The queue of slabs to scrub first */
|
|
Packit Service |
75d76b |
RingNode highPrioritySlabs;
|
|
Packit Service |
75d76b |
/** The queue of slabs to scrub once there are no highPrioritySlabs */
|
|
Packit Service |
75d76b |
RingNode slabs;
|
|
Packit Service |
75d76b |
/** The queue of VIOs waiting for a slab to be scrubbed */
|
|
Packit Service |
75d76b |
WaitQueue waiters;
|
|
Packit Service |
75d76b |
|
|
Packit Service |
75d76b |
// The number of slabs that are unrecovered or being scrubbed. This field is
|
|
Packit Service |
75d76b |
// modified by the physical zone thread, but is queried by other threads.
|
|
Packit Service |
75d76b |
Atomic64 slabCount;
|
|
Packit Service |
75d76b |
|
|
Packit Service |
75d76b |
/** The administrative state of the scrubber */
|
|
Packit Service |
75d76b |
AdminState adminState;
|
|
Packit Service |
75d76b |
/** Whether to only scrub high-priority slabs */
|
|
Packit Service |
75d76b |
bool highPriorityOnly;
|
|
Packit Service |
75d76b |
/** The context for entering read-only mode */
|
|
Packit Service |
75d76b |
ReadOnlyNotifier *readOnlyNotifier;
|
|
Packit Service |
75d76b |
/** The slab currently being scrubbed */
|
|
Packit Service |
75d76b |
Slab *slab;
|
|
Packit Service |
75d76b |
/** The extent for loading slab journal blocks */
|
|
Packit Service |
75d76b |
VDOExtent *extent;
|
|
Packit Service |
75d76b |
/** A buffer to store the slab journal blocks */
|
|
Packit Service |
75d76b |
char *journalData;
|
|
Packit Service |
75d76b |
};
|
|
Packit Service |
75d76b |
|
|
Packit Service |
75d76b |
#endif // SLAB_SCRUBBER_INTERNALS_H
|