Blame source/vdo/base/vioWrite.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/vioWrite.h#1 $
Packit Service 75d76b
 */
Packit Service 75d76b
Packit Service 75d76b
#ifndef VIO_WRITE_H
Packit Service 75d76b
#define VIO_WRITE_H
Packit Service 75d76b
Packit Service 75d76b
#include "types.h"
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Release the PBN read lock if it is held.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param dataVIO  The possible lock holder
Packit Service 75d76b
 **/
Packit Service 75d76b
void releasePBNReadLock(DataVIO *dataVIO);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Start the asynchronous processing of a DataVIO for a write request which has
Packit Service 75d76b
 * acquired a lock on its logical block by joining the current flush generation
Packit Service 75d76b
 * and then attempting to allocate a physical block.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param dataVIO  The DataVIO doing the write
Packit Service 75d76b
 **/
Packit Service 75d76b
void launchWriteDataVIO(DataVIO *dataVIO);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Clean up a DataVIO which has finished processing a write.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param dataVIO  The DataVIO to clean up
Packit Service 75d76b
 **/
Packit Service 75d76b
void cleanupWriteDataVIO(DataVIO *dataVIO);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Continue a write by attempting to compress the data. This is a re-entry
Packit Service 75d76b
 * point to vioWrite used by hash locks.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param dataVIO   The DataVIO to be compressed
Packit Service 75d76b
 **/
Packit Service 75d76b
void compressData(DataVIO *dataVIO);
Packit Service 75d76b
Packit Service 75d76b
#endif /* VIO_WRITE_H */