Blame source/vdo/base/slabScrubberInternals.h

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