Introduce on_init/on_deinit ops in ocf_volume interface
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
committed by
Jan Musial
parent
67024ebdb3
commit
c9ea68f3bf
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -82,6 +82,24 @@ struct ocf_volume_ops {
|
||||
*/
|
||||
void (*submit_write_zeroes)(struct ocf_io *io);
|
||||
|
||||
/**
|
||||
* @brief Volume initialization callback, called when volume object
|
||||
* is being initialized
|
||||
*
|
||||
* @param[in] volume Volume
|
||||
*
|
||||
* @return Zero on success, otherwise error code
|
||||
*/
|
||||
int (*on_init)(ocf_volume_t volume);
|
||||
|
||||
/**
|
||||
* @brief Volume deinitialization callback, called when volume object
|
||||
* is being deinitialized
|
||||
*
|
||||
* @param[in] volume Volume
|
||||
*/
|
||||
void (*on_deinit)(ocf_volume_t volume);
|
||||
|
||||
/**
|
||||
* @brief Open volume
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user