Blame source/vdo/base/slabScrubberInternals.h

Packit Service d40955
/*
Packit Service d40955
 * Copyright (c) 2020 Red Hat, Inc.
Packit Service d40955
 *
Packit Service d40955
 * This program is free software; you can redistribute it and/or
Packit Service d40955
 * modify it under the terms of the GNU General Public License
Packit Service d40955
 * as published by the Free Software Foundation; either version 2
Packit Service d40955
 * of the License, or (at your option) any later version.
Packit Service d40955
 * 
Packit Service d40955
 * This program is distributed in the hope that it will be useful,
Packit Service d40955
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service d40955
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service d40955
 * GNU General Public License for more details.
Packit Service d40955
 * 
Packit Service d40955
 * You should have received a copy of the GNU General Public License
Packit Service d40955
 * along with this program; if not, write to the Free Software
Packit Service d40955
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit Service d40955
 * 02110-1301, USA. 
Packit Service d40955
 *
Packit Service d40955
 * $Id: //eng/vdo-releases/aluminum/src/c++/vdo/base/slabScrubberInternals.h#5 $
Packit Service d40955
 */
Packit Service d40955
Packit Service d40955
#ifndef SLAB_SCRUBBER_INTERNALS_H
Packit Service d40955
#define SLAB_SCRUBBER_INTERNALS_H
Packit Service d40955
Packit Service d40955
#include "slabScrubber.h"
Packit Service d40955
Packit Service d40955
#include "adminState.h"
Packit Service d40955
#include "atomic.h"
Packit Service d40955
#include "extent.h"
Packit Service d40955
#include "ringNode.h"
Packit Service d40955
Packit Service d40955
struct slabScrubber {
Packit Service d40955
  VDOCompletion     completion;
Packit Service d40955
  /** The queue of slabs to scrub first */
Packit Service d40955
  RingNode          highPrioritySlabs;
Packit Service d40955
  /** The queue of slabs to scrub once there are no highPrioritySlabs */
Packit Service d40955
  RingNode          slabs;
Packit Service d40955
  /** The queue of VIOs waiting for a slab to be scrubbed */
Packit Service d40955
  WaitQueue         waiters;
Packit Service d40955
Packit Service d40955
  // The number of slabs that are unrecovered or being scrubbed. This field is
Packit Service d40955
  // modified by the physical zone thread, but is queried by other threads.
Packit Service d40955
  Atomic64          slabCount;
Packit Service d40955
Packit Service d40955
  /** The administrative state of the scrubber */
Packit Service d40955
  AdminState        adminState;
Packit Service d40955
  /** Whether to only scrub high-priority slabs */
Packit Service d40955
  bool              highPriorityOnly;
Packit Service d40955
  /** The context for entering read-only mode */
Packit Service d40955
  ReadOnlyNotifier *readOnlyNotifier;
Packit Service d40955
  /** The slab currently being scrubbed */
Packit Service d40955
  Slab             *slab;
Packit Service d40955
  /** The extent for loading slab journal blocks */
Packit Service d40955
  VDOExtent        *extent;
Packit Service d40955
  /** A buffer to store the slab journal blocks */
Packit Service d40955
  char             *journalData;
Packit Service d40955
};
Packit Service d40955
Packit Service d40955
#endif // SLAB_SCRUBBER_INTERNALS_H